new-date-time-helper
v1.0.9
Published
the library will help convert date time into various format
Downloads
4
Readme
date-time-helper
Usage
Node environment
Install
npm install new-date-time-helper
Usage
import { DateTimeHelper } from "new-date-time-helper";
console.log(DateTimeHelper.getTodayYearMonthData());
Browser environment
Add this script in the body of html.
<script src="https://www.unpkg.com/new-date-time-helper@version/out/date-time-helper.js"></script>
Use this way in js files.
Dispatch.DateTimeHelper.getTodayYearMonthData()
Setup
First, clone this git repo.
Then, enter the date-time-helper directory and run the build script:
npm install
npm install -g gulp
Test
gulp test
Build
gulp
This will generate two folder dist
and out
.
dist
will be used when using the library in node environment.
out
will be used when using the library in browser environment.
Publish
For publishing, after adding neccessary funtionality and test, need to push to main
branch.
gulp
git add .
git commit -m "dist built"
git tag "1.0.8"
git push origin main
git push --tags
npm publish