Skip to content

Commit ce0c03c

Browse files
committed
1.0.7
1 parent 866b9b9 commit ce0c03c

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ All notable changes to this project will be documented in this file. Dates are d
44

55
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
66

7-
#### 1.0.6
7+
#### 1.0.7
88

9-
> 9 March 2021
9+
> 27 April 2021
1010
11-
- Fix Version Workflow [`#74`](https://github.com/fmenezes/json-stringify-date/pull/74)
11+
- Do not check build in release [`#82`](https://github.com/fmenezes/json-stringify-date/pull/82)

browser.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module.exports = (function () {
6161

6262
},{"moment":2}],2:[function(require,module,exports){
6363
//! moment.js
64-
//! version : 2.27.0
64+
//! version : 2.29.1
6565
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
6666
//! license : MIT
6767
//! momentjs.com
@@ -2602,8 +2602,7 @@ module.exports = (function () {
26022602
hooks.createFromInputFallback = deprecate(
26032603
'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
26042604
'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
2605-
'discouraged and will be removed in an upcoming major release. Please refer to ' +
2606-
'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
2605+
'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',
26072606
function (config) {
26082607
config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
26092608
}
@@ -3788,7 +3787,10 @@ module.exports = (function () {
37883787
function calendar$1(time, formats) {
37893788
// Support for single parameter, formats only overload to the calendar function
37903789
if (arguments.length === 1) {
3791-
if (isMomentInput(arguments[0])) {
3790+
if (!arguments[0]) {
3791+
time = undefined;
3792+
formats = undefined;
3793+
} else if (isMomentInput(arguments[0])) {
37923794
time = arguments[0];
37933795
formats = undefined;
37943796
} else if (isCalendarSpec(arguments[0])) {
@@ -4466,7 +4468,7 @@ module.exports = (function () {
44664468
eras = this.localeData().eras();
44674469
for (i = 0, l = eras.length; i < l; ++i) {
44684470
// truncate time
4469-
val = this.startOf('day').valueOf();
4471+
val = this.clone().startOf('day').valueOf();
44704472

44714473
if (eras[i].since <= val && val <= eras[i].until) {
44724474
return eras[i].name;
@@ -4486,7 +4488,7 @@ module.exports = (function () {
44864488
eras = this.localeData().eras();
44874489
for (i = 0, l = eras.length; i < l; ++i) {
44884490
// truncate time
4489-
val = this.startOf('day').valueOf();
4491+
val = this.clone().startOf('day').valueOf();
44904492

44914493
if (eras[i].since <= val && val <= eras[i].until) {
44924494
return eras[i].narrow;
@@ -4506,7 +4508,7 @@ module.exports = (function () {
45064508
eras = this.localeData().eras();
45074509
for (i = 0, l = eras.length; i < l; ++i) {
45084510
// truncate time
4509-
val = this.startOf('day').valueOf();
4511+
val = this.clone().startOf('day').valueOf();
45104512

45114513
if (eras[i].since <= val && val <= eras[i].until) {
45124514
return eras[i].abbr;
@@ -4529,7 +4531,7 @@ module.exports = (function () {
45294531
dir = eras[i].since <= eras[i].until ? +1 : -1;
45304532

45314533
// truncate time
4532-
val = this.startOf('day').valueOf();
4534+
val = this.clone().startOf('day').valueOf();
45334535

45344536
if (
45354537
(eras[i].since <= val && val <= eras[i].until) ||
@@ -5680,7 +5682,7 @@ module.exports = (function () {
56805682

56815683
//! moment.js
56825684

5683-
hooks.version = '2.27.0';
5685+
hooks.version = '2.29.1';
56845686

56855687
setHookCallback(createLocal);
56865688

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "json-stringify-date",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"description": "Like JSON.stringify, but preserve timezones in date objects and parse dates into Date object",
55
"main": "index.js",
66
"browser": "browser.js",

0 commit comments

Comments
 (0)