+ Readme Update
This commit is contained in:
parent
2fca2d3f18
commit
5eac2dc1e2
13
README.md
13
README.md
|
@ -31,6 +31,15 @@ Using npm:
|
|||
$ npm i tymejs
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
All of the available formats are directly from [PHP's date formats](https://www.php.net/manual/en/datetime.format.php#refsect1-datetime.format-parameters)
|
||||
|
||||
|
||||
#### ⚠ Warning ⚠
|
||||
⚠ Not all different character formats have been implemented. ⚠
|
||||
|
||||
|
||||
In Node.js TypeScript:
|
||||
```js
|
||||
// Import the Package
|
||||
|
@ -45,6 +54,8 @@ let t: TymeJS = new TymeJS(myDate);
|
|||
// Now you can format different dates
|
||||
let formattedDate: string = t.format("d/m/Y H:i A");
|
||||
|
||||
// All Available formats: https://www.php.net/manual/en/datetime.format.php#refsect1-datetime.format-parameters
|
||||
|
||||
// Log the formatted Date
|
||||
console.log(formattedDate);
|
||||
```
|
||||
|
@ -62,6 +73,8 @@ let t = new TymeJS(myDate);
|
|||
// Now you can format different dates
|
||||
let formattedDate = t.format("d/m/Y H:i A");
|
||||
|
||||
// All Available formats: https://www.php.net/manual/en/datetime.format.php#refsect1-datetime.format-parameters
|
||||
|
||||
// Log the formatted Date
|
||||
console.log(formattedDate);
|
||||
```
|
||||
|
|
Reference in New Issue