From ac4566a8900dc50eaac855500cf4f8679c034ece Mon Sep 17 00:00:00 2001
From: Alex <100605452+Likio3000@users.noreply.github.com>
Date: Wed, 23 Sep 2026 04:00:51 +1000
Subject: [PATCH 1/2] docs: make example dates and month output deterministic
---
readme.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/readme.md b/readme.md
index 1d07c8b..9f4089e 100644
--- a/readme.md
+++ b/readme.md
@@ -20,7 +20,7 @@ $ npm install --save tinydate
```js
const tinydate = require('tinydate');
-const fooDate = new Date('5/1/2017, 4:30:09 PM');
+const fooDate = new Date(2017, 4, 1, 16, 30, 9);
const stamp = tinydate('Current time: [{HH}:{mm}:{ss}]');
@@ -54,13 +54,13 @@ A custom dictionary of template patterns. You may override [existing patterns](#
> **Important:** All dictionary items **must be a function** and must control its own formatting.
For example, when defining your own `{ss}` template, `tinydate` **will not** pad its value to two digits.
```js
-const today = new Date('2019-07-04, 5:30:00 PM');
+const today = new Date(2019, 6, 4, 17, 30);
// Example custom dictionary:
// - Adds {MMMM}
// - Overrides {DD}
const stamp = tinydate('Today is: {MMMM} {DD}, {YYYY}', {
- MMMM: d => d.toLocaleString('default', { month: 'long' }),
+ MMMM: d => d.toLocaleString('en-US', { month: 'long' }),
DD: d => d.getDate()
});
From f855edefde1ce5af43025865d92616262376d021 Mon Sep 17 00:00:00 2001
From: Alex <100605452+Likio3000@users.noreply.github.com>
Date: Wed, 23 Sep 2026 04:48:42 +1000
Subject: [PATCH 2/2] docs: narrow month example correction to locale
---
readme.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/readme.md b/readme.md
index 9f4089e..7c4b332 100644
--- a/readme.md
+++ b/readme.md
@@ -20,7 +20,7 @@ $ npm install --save tinydate
```js
const tinydate = require('tinydate');
-const fooDate = new Date(2017, 4, 1, 16, 30, 9);
+const fooDate = new Date('5/1/2017, 4:30:09 PM');
const stamp = tinydate('Current time: [{HH}:{mm}:{ss}]');
@@ -54,7 +54,7 @@ A custom dictionary of template patterns. You may override [existing patterns](#
> **Important:** All dictionary items **must be a function** and must control its own formatting.
For example, when defining your own `{ss}` template, `tinydate` **will not** pad its value to two digits.
```js
-const today = new Date(2019, 6, 4, 17, 30);
+const today = new Date('2019-07-04, 5:30:00 PM');
// Example custom dictionary:
// - Adds {MMMM}