absolute-timestamp
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Absolute timestamp

version minzipped size downloads

AbsoluteTimestamp is a React 17+ component for display Unix timestamps in absolute format, e.g. "December 31, 1969, 16:00 PST".

Install

  • npm install absolute-timestamp or
  • yarn add absolute-timestamp

Use

import AbsoluteTimestamp from 'absolute-timestamp';

function App() {
  return <AbsoluteTimestamp>{Date.now()}</AbsoluteTimestamp>;
}

Props

locales

Type: string | string[] optional

Default: 'en-US'

In order to get the format of the language used in the user interface of your application, make sure to specify that language (and possibly some fallback languages).

See also: Intl.DateTimeFormat

timeZone

Type: string optional

Default: undefined

timeZone specifies the time zone to use. The only value guaranteed to be recognized is 'UTC'; the default is the runtime's default time zone. Devices may also recognize the time zone names of the IANA time zone database, such as 'Asia/Shanghai', 'Asia/Kolkata', or 'America/New_York'.

See also: Intl.DateTimeFormat

Contributing

  • yarn set version latest
  • yarn
  • yarn up * && yarn up @*/*
  • yarn dlx @yarnpkg/pnpify --sdk vscode

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i absolute-timestamp

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

12.1 kB

Total Files

12

Last publish

Collaborators

  • charlesstover