universal-user-time-display
v1.0.4
Published
* This is a react based component for displaying time based upon his/her timezone using Moment * This component is part of a larger project SPACE (Software Platform for Automating Complexity with Efficiency) * www.perazim.io * \<link href="https://fonts.g
Downloads
3
Readme
Universal User Time Display
- This is a react based component for displaying time based upon his/her timezone using Moment
- This component is part of a larger project SPACE (Software Platform for Automating Complexity with Efficiency)
- www.perazim.io
- <link href="https://fonts.googleapis.com/css?family=Cabin|Heebo|Roboto+Condensed&display=swap" rel="stylesheet" > , copy this code into the of your HTML document for fonts.
- npm install universal-user-time-display
How to Use the component
- <UniversalTimeDisplayComponent currentUtcInMs={...} zone:{...} format={...} backgroundColor={...} color={...} />
The components accepts the following props
- currentUtcInMs - The current UTC in millis (number). If not provided, it takes the UTC from your system
- zone - Valid Time Zone name (do not give codes like 'CST', 'PST' etc) of the user (eg, "America/Los_Angeles"). If not provided, defaults to "Europe/London".
- format - "HH" | 'hh'. 'HH' for 24 hr format and 'hh' am/pm format.
- backgroundColor - the background color for the time display
- color - the color for the time display.