react-native-converter
Converter for React Native
Last updated 6 months ago by macleysousa .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install react-native-converter 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.5                                ...           latest (6 months ago)

5 Versions

  • 1.0.5                                ...           6 months ago
  • 1.0.4                                ...           6 months ago
  • 1.0.3                                ...           6 months ago
  • 1.0.2                                ...           6 months ago
  • 1.0.0                                ...           6 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |