0.1.1 • Published 3 years ago
empower-clock v0.1.1
Empower Category Menu
Installation
npm i empower-clock
Usage
Include in the component:
import Clock from 'empower-clock';
Properties
date - A string datetime, sample format is 3/31/2022, 2:15:22 PM
format - A desired format you wanted to be returned based on the date props.
ticking - Make this true if you want your clock / date to be realtime updating, and false if you want a static clock
supported format
datetime - Mon, 01 Jan 2020 at 12:00PM
date - Mon, 01 Jan 2020
inquiry-date-standard - 10 Feb 2021
date-standard - 2021-02-10 15:49
full-year - 2022
full-month - February
month-year - Feb 2021
full-month-year - February 2021
month-day-year - February 10, 2021
time - 3:58 PM
day-name-full - Tuesday
Example
const sampleProps = {
date: '3/31/2022, 2:15:22 PM',
format: 'time',
ticking: true,
};
const App = () => {
return (
<div className="sample-div">
<Clock
{...sampleProps}
/>
</div>
);
}
export default App;