Skip to content

Commit

Permalink
Release/morgan (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonDotsoy authored Jan 11, 2024
2 parents f8e5ebf + 78c5cb0 commit c30d217
Show file tree
Hide file tree
Showing 10 changed files with 1,333 additions and 150 deletions.
66 changes: 66 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,71 @@
# Changelog

## [0.4.3](https://github.com/JonDotsoy/ndate/compare/morgan-v0.4.2...morgan-v0.4.3) (2023-10-30)


### Bug Fixes

* upgrade types required on handler ([8e6f09c](https://github.com/JonDotsoy/ndate/commit/8e6f09c53f98cb16c0f10d434b2713620253a4a4))

## [0.4.2](https://github.com/JonDotsoy/ndate/compare/morgan-v0.4.1...morgan-v0.4.2) (2023-10-30)


### Miscellaneous Chores

* release 0.4.2 ([849a115](https://github.com/JonDotsoy/ndate/commit/849a11512db14b587226190c4fbeec76c2e7eb4a))

## [0.4.1](https://github.com/JonDotsoy/ndate/compare/morgan-v0.4.0-morgan...morgan-v0.4.1) (2023-10-30)


### Features

* unwrap handler ([ad75381](https://github.com/JonDotsoy/ndate/commit/ad7538179419017c0d2954546fbfdd986027e492))


### Miscellaneous Chores

* release 0.4.1 ([da20150](https://github.com/JonDotsoy/ndate/commit/da20150d8bbd5a543139b924036a14365672de71))

## 0.4.0-morgan (2023-10-28)


### ⚠ BREAKING CHANGES

* configure strategy release by release name

### Features

* add execution header on ndate ([4b1ba2f](https://github.com/JonDotsoy/ndate/commit/4b1ba2fa5f22330f264046f046aacec40ebc531c))
* Add flag --epoch, --epoch-ms and --time-zone ([c49ceac](https://github.com/JonDotsoy/ndate/commit/c49ceace5cb14d9c2ea3f836dc73d7c31d88a738))
* add flag `--template` ([29fa11e](https://github.com/JonDotsoy/ndate/commit/29fa11e014e11bfd2f4e890906c6834fad47d127))
* add new flags to the template ([b85b5c9](https://github.com/JonDotsoy/ndate/commit/b85b5c9e7b43f6dab427912a578e006b4f98ae99))
* add support orender on sheet date ([a83a598](https://github.com/JonDotsoy/ndate/commit/a83a598f2d11d7d02b7c10741011a0d48cbada0a))
* configure executable script ([c6e5ae1](https://github.com/JonDotsoy/ndate/commit/c6e5ae12ce7d8debc762f721f0749658710104d8))
* configure utc flag ([42e3ade](https://github.com/JonDotsoy/ndate/commit/42e3adece8f984f4e8423338aef625b9c186bb34))
* initial commit ([c52bd93](https://github.com/JonDotsoy/ndate/commit/c52bd93256a4124e7399204ff67a9c0145d5f578))
* initialize version ([d59c863](https://github.com/JonDotsoy/ndate/commit/d59c86395e428ee0b072877943ae7036581593dd))
* rename main function per setup ([b4d8675](https://github.com/JonDotsoy/ndate/commit/b4d86755ce7cd38526bd90c723a6720d9cb9813d))
* upgrade ndate command ([4c198f1](https://github.com/JonDotsoy/ndate/commit/4c198f1fef1bb02dbe1676eeec93d28d2ad0075e))
* upgrade template and permisions ([c9e767a](https://github.com/JonDotsoy/ndate/commit/c9e767ae35860b8b001f22337f7e997701995afe))


### Bug Fixes

* alias template to Hour, Minute, Second and Millisecond. ([b7a87d7](https://github.com/JonDotsoy/ndate/commit/b7a87d7118f86b1467df3a472f9746a3d4ea655f))
* fix the padding start of the `{{ms}}` flag with a length of 3 ([a1733cf](https://github.com/JonDotsoy/ndate/commit/a1733cf52e99c8e5972f4244f651545d9047852e))
* upgrade values to and ([8896c75](https://github.com/JonDotsoy/ndate/commit/8896c75ff36e52e315c75d5d89e0fa62f6a3eb5e))


### Miscellaneous Chores

* release 0.4.0-alpha ([8d7039e](https://github.com/JonDotsoy/ndate/commit/8d7039e668904bc04a5710ff38636848776a6c66))
* release 0.4.0-morgan ([72a7460](https://github.com/JonDotsoy/ndate/commit/72a746054195df482f745f85351b5e0260908ce0))


### Build System

* configure strategy release by release name ([385d77d](https://github.com/JonDotsoy/ndate/commit/385d77d3b5527ff03efe033758dff23705e65d0f))

## [0.3.0](https://github.com/JonDotsoy/ndate/compare/v0.2.9...v0.3.0) (2023-07-22)


Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,23 @@
Date format to console.

```shell
Usage: ndate [-] [--zero] [--date-style <full|long|medium|short|none>] [--time-style <full|long|medium|short|none>]
[--hour-cycles <h11|h12|h23|h24|none>] [--time-zone <time-zone>] [--local <locale>]
[--template <template>] [--json] [--utc] [--epoch] [--epoch-ms] [--date <date>]
[--help] [-j] [-d <date>] [-l <locale>] [-tz <time-zone>] [-z] [-h]
Usage: ndate [-] [--date <date>] [-d <date>] [--date-style <full|long|medium|short|none>]
[--time-style <full|long|medium|short|none>] [--hour-cycles <h11|h12|h23|h24|none>]
[--time-zone <time-zone>] [-tz <time-zone>] [--local <locale>] [-l <locale>]
[--template <template>] [--json] [-j] [--sheet] [--utc] [--epoch] [--epoch-ms]
[--help] [-h] [--zero] [-z]
```

Install with [homebrew](https://brew.sh/):

```shell
brew install jondotsoy/ndate/ndate
brew install jondotsoy/ndate/ndate@0.4
```

Or install with deno:

```shell
deno install --allow-env=TZ,LANG https://deno.land/x/ndate/ndate.ts
deno install --allow-env=TZ,LANG https://deno.land/x/ndate@morgan-v0.4.3/ndate.ts
```

Samples use:
Expand All @@ -38,6 +39,7 @@ ndate --epoch-ms # 1689255823663
ndate --epoch-ms -z # 1689255823663%
ndate --template '{{utc_full_year}}-{{utc_month:padStart:2:0}}-{{utc_date:padStart:2:0}}' # 2023-06-13
ndate --template '{{YYYY}}{{MM}}{{DD}}{{HH}}{{MM}}{{SS}}{{MS}}' # 202330142030590781
ndate --sheet # =DATE(2023;10;28)+TIME(1;17;12)
```

## Options to `--template`
Expand Down
116 changes: 111 additions & 5 deletions __snapshots__/ndate.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,14 +1,120 @@
export const snapshot = {};

snapshot[`show help 1`] = `
"Usage: ndate [-] [--zero] [--date-style <full|long|medium|short|none>] [--time-style <full|long|medium|short|none>]
"Usage: ndate [-] [--date <date>] [-d <date>] [--date-style <full|long|medium|short|none>]
" +
" [--hour-cycles <h11|h12|h23|h24|none>] [--time-zone <time-zone>] [--local <locale>]
" [--time-style <full|long|medium|short|none>] [--hour-cycles <h11|h12|h23|h24|none>]
" +
" [--template <template>] [--json] [--utc] [--epoch] [--epoch-ms] [--date <date>]
" [--time-zone <time-zone>] [-tz <time-zone>] [--local <locale>] [-l <locale>]
" +
" [--help] [-j] [-d <date>] [-l <locale>] [-tz <time-zone>] [-z] [-h]
" [--template <template>] [--json] [-j] [--sheet] [--utc] [--epoch] [--epoch-ms]
" +
" [--help] [-h] [--zero] [-z]
"
`;
snapshot[`render date 1`] = `"miércoles, 13 de diciembre de 2023, 00:00:00 hora de verano de Chile"`;
snapshot[`render date 1`] = `"miércoles, 13 de diciembre de 2023, 01:00:00 hora de verano de Chile"`;
snapshot[`format json 1`] = `"2023-08-08T03:38:58.570Z"`;
snapshot[`format utc 1`] = `"Tue, 08 Aug 2023 03:38:58 GMT"`;
snapshot[`format epoch 1`] = `"1691465938"`;
snapshot[`format epoch ms 1`] = `"1691465938570"`;
snapshot[`format sheet 1`] = `"=DATE(2023;8;7)+TIME(23;38;58)"`;
snapshot[`format template 1`] = `
"epoch:1691465938
" +
"epoch_ms:1691465938570
" +
"json:2023-08-08T03:38:58.570Z
" +
"iso:2023-08-08T03:38:58.570Z
" +
"iso8601:2023-08-08T03:38:58.570Z
" +
"utc:Tue, 08 Aug 2023 03:38:58 GMT
" +
"rfc7231:Tue, 08 Aug 2023 03:38:58 GMT
" +
"local:lunes, 7 de agosto de 2023, 23:38:58 hora estándar de Chile
" +
"time:1691465938570
" +
"YYYY:2023
" +
"MM:08
" +
"DD:07
" +
"hh:23
" +
"mm:38
" +
"ss:58
" +
"ms:570
" +
"full_year:2023
" +
"month:8
" +
"date:7
" +
"day:1
" +
"hours:23
" +
"minutes:38
" +
"seconds:58
" +
"milliseconds:570
" +
"timezone_offset:240
" +
"utc_full_year:2023
" +
"utc_month:8
" +
"utc_date:8
" +
"utc_day:2
" +
"utc_hours:3
" +
"utc_minutes:38
" +
"utc_seconds:58
" +
"utc_milliseconds:570
" +
"local_weekday:lunes
" +
"local_literal:
" +
"local_day:7
" +
"local_month:agosto
" +
"local_year:2023
" +
"local_hour:23
" +
"local_minute:38
" +
"local_second:58
" +
"local_timeZoneName:hora estándar de Chile"
`;
snapshot[`format template with transform 1`] = `'"Tue, 08 Aug 2023 03:38:58 GMT"'`;
snapshot[`format template with transform 2`] = `"Tue"`;
snapshot[`format template with transform 3`] = `"0008"`;
snapshot[`format template with transform 4`] = `"8000"`;
Loading

0 comments on commit c30d217

Please sign in to comment.