empower-helper
TypeScript icon, indicating that this package has built-in type declarations

0.1.7 • Public • Published

Getting Started with Empower Helper (Typescript)

  1. Date Time Formatter

1) datetimeFormatter

Initialization

import {datetimeFormatter} from 'empower-helper';

Usage

1st parameter is a datetime string e.g. 2022-11-04 11:11:25+00 and 2nd parameter can be the following with corresponding returns

2nd parameter Expected return
'datetime' "Fri, 04 Nov 2022 at 11:11 AM"
'datetime-no-at' "Fri, 04 Nov 2022, 11:11 AM"
'datetime-no-day' "04 Nov 2022 at 11:11 AM"
'date' "Fri, 04 Nov 2022"
'inquiry-date-standard' "04 Nov 2022"
'date-standard' "2022-11-04"
'datetime-standard' "2022-11-04 11:11"
'datetime-standard-full' "2022-11-04 11:11:00"
'day-fulldate' "Friday 04 Nov 2022"
'full-year' 2022
'full-month' "November"
'month-year' "Nov 2022"
'full-month-year' "November 2022"
'datetime-format-forPosting' "2022-11-04T03:11:25Z"
'month-day-year' "November 04, 2022"
'time' "11:11 AM"
'month-numeric' 11
'month-shortName' "Nov"
'day-numeric' 4
'day-calendar' "04"
'month-first-date' "2022-11-01"
'month-last-date' "2022-11-30"
'day-name' "Fri"
'day-name-full' "Friday"
'month-day' "11-04"
'time-standard' "11:11"
'notif-date' "04-Nov-2022"
'year-month' "2022-11"
'datetime-utc' "2022-11-04 00:00:00+00"
'datetime-utc-semifull' "2022-11-04 11:11:25+00"
'datetime-file-format' "2022-1141111251"
'datetime-file-format-generator' "2022-11-04_11:11:25"
{datetimeFormatter('2022-11-04 11:11:25+00', 'datetime')}

Changelog

  • 0.1.1 - Initial publish, added the datetimeFormatter function.

Readme

Keywords

none

Package Sidebar

Install

npm i empower-helper

Weekly Downloads

1

Version

0.1.7

License

none

Unpacked Size

83.7 kB

Total Files

28

Last publish

Collaborators

  • mike.baccay