Neurotic Pumpkin Murderer

    react-native-converter

    1.0.5 • Public • Published

    react-native-converter

    npm license

    Install

    Using yarn

    yarn add react-native-converter

    or using npm

    npm install --save react-native-converter

    numberToString

    import * as converter from 'react-native-converter';
     
    converter.numberToString(1000.5, 'N2'); //result 1.000,50

    Properties

    value format description
    number N0 return string ex: 1.000
    number N1 return string ex: 1.000,0
    number N2 return string ex: 1.000,00
    number N3 return string ex: 1.000,000
    number N4 return string ex: 1.000,0000

    dateToString

    import * as converter from 'react-native-converter';
     
    converter.dateToString(new Date(), 't'); //result 13:00
     
    converter.dateToString(new Date(), 'd','en-US'); //result 2020/01/02
     
    converter.dateToString(new Date(), 'd','pt-BR'); //result 02/01/2020

    Properties

    value format description
    Date t return string ex: 13:00
    Date T return string ex: 13:00:00
    Date d return string ex: 2020/01/02
    Date g return string ex: 2020/01/02 13:30
    Date G return string ex: 2020/01/02 13:30:12
    Date M return string ex: 01 January
    Date M3 return string ex: 01 Jan

    dateToTimezoneOffset

    import * as converter from 'react-native-converter';
     
    converter.dateToTimezoneOffset(new Date(), 60);

    Properties

    value timezoneOffset
    Date Minutes

    License

    MIT License. © Macley Sousa

    Install

    npm i react-native-converter

    DownloadsWeekly Downloads

    3

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    11.1 kB

    Total Files

    7

    Last publish

    Collaborators

    • macleysousa