New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

absolute-timestamp

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

absolute-timestamp

React component to formats a timestamp in absolute time.

1.0.1
latest
Source
npm
Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 09 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts