Skip to content

Commit fb6bb03

Browse files
authored
Merge pull request #53 from ejcenteno/chore-update-date-fns
🔀 chore(package.json): update date-fns dependency to version ^2.30.0
2 parents f4e6ef0 + 4b01b74 commit fb6bb03

File tree

5 files changed

+29
-15
lines changed

5 files changed

+29
-15
lines changed

DOC.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -230,25 +230,25 @@ Format any valid date using date-fns' `format()` function.
230230

231231
`morph-date-format(format)`
232232

233-
*Note* - `morph-date-format` is now using using [`date-fns@v1.30.1`](https://date-fns.org/).
233+
*Note* - `morph-date-format` is now using using [`date-fns@v2.30.0`](https://date-fns.org/).
234234

235235
```html
236-
<p>{{ new Date() | morph-date-format('MMM DD, YYYY') }}</p>
236+
<p>{{ new Date() | morph-date-format('MMM dd, yyyy') }}</p>
237237
<!-- Jul 26, 2017 -->
238238

239-
<p>{{ new Date() | morph-date-format('YYYY') }}</p>
239+
<p>{{ new Date() | morph-date-format('yyyy') }}</p>
240240
<!-- 2017 -->
241241

242-
<p>{{ new Date() | morph-date-format('[Today is a] dddd') }}</p>
242+
<p>{{ new Date() | morph-date-format('[Today is a] EEEE') }}</p>
243243
<!-- Today is Wednesday -->
244244
```
245245

246246
```javascript
247247
const date = new Date('1976-03-20');
248248

249-
const formatted = this.$morphDateFormat(date, 'MMM DD, YYYY');
250-
const year = this.$morphDateFormat(date, 'YYYY');
251-
const time = this.$morphDateFormat(new Date(), 'hh:mm A');
249+
const formatted = this.$morphDateFormat(date, 'MMM dd, yyyy');
250+
const year = this.$morphDateFormat(date, 'yyyy');
251+
const time = this.$morphDateFormat(new Date(), 'hh:mm a');
252252

253253
console.log(formatted); // Mar 20, 1976
254254
console.log(year); // 1976
@@ -257,7 +257,7 @@ console.log(time); // 11:00 PM
257257

258258
**API**
259259

260-
All formats are available of course in the [date-fns format documentation](https://date-fns.org/v1.30.1/docs/format), but here are some common examples.
260+
All formats are available of course in the [date-fns format documentation](https://date-fns.org/v2.30.0/docs/format), but here are some common examples.
261261

262262
[Back to top](#filters)
263263

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"dependencies": {
2828
"cryptiles": "^4.1.3",
29-
"date-fns": "1.30.1",
29+
"date-fns": "^2.30.0",
3030
"deep-extend": "^0.6.0",
3131
"filesize": "^6.1.0",
3232
"fstream": "^1.0.12",

src/filters/age/age.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createLocalVue } from '@vue/test-utils';
22
import { age } from './age';
3-
const CHESTER_BENNINGTON_AGE = 44;
3+
const CHESTER_BENNINGTON_AGE = 47;
44

55
it('adds a $morphAge method to the Vue prototype', () => {
66
const localVue = createLocalVue();

src/filters/date/date-format.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ it('adds a $morphDate method to the Vue prototype', () => {
1010
it('should format date', () => {
1111
const localVue = createLocalVue();
1212
localVue.use(dateFormat);
13-
expect(localVue.prototype.$morphDateFormat(new Date(2017, 6, 26), 'MMM DD, YYYY')).toEqual('Jul 26, 2017');
13+
expect(localVue.prototype.$morphDateFormat(new Date(2017, 6, 26), 'MMM dd, yyyy')).toEqual('Jul 26, 2017');
1414
});

yarn.lock

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,6 +1037,13 @@
10371037
"@babel/plugin-transform-typeof-symbol" "7.0.0-beta.53"
10381038
"@babel/plugin-transform-unicode-regex" "7.0.0-beta.53"
10391039

1040+
"@babel/runtime@^7.21.0":
1041+
version "7.22.10"
1042+
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.10.tgz#ae3e9631fd947cb7e3610d3e9d8fef5f76696682"
1043+
integrity sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==
1044+
dependencies:
1045+
regenerator-runtime "^0.14.0"
1046+
10401047
"@babel/runtime@^7.7.5":
10411048
version "7.7.7"
10421049
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.7.7.tgz#194769ca8d6d7790ec23605af9ee3e42a0aa79cf"
@@ -2567,10 +2574,12 @@ data-urls@^1.0.0:
25672574
whatwg-mimetype "^2.2.0"
25682575
whatwg-url "^7.0.0"
25692576

2570-
2571-
version "1.30.1"
2572-
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c"
2573-
integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==
2577+
date-fns@^2.30.0:
2578+
version "2.30.0"
2579+
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0"
2580+
integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==
2581+
dependencies:
2582+
"@babel/runtime" "^7.21.0"
25742583

25752584
de-indent@^1.0.2:
25762585
version "1.0.2"
@@ -5978,6 +5987,11 @@ regenerator-runtime@^0.13.2:
59785987
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5"
59795988
integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==
59805989

5990+
regenerator-runtime@^0.14.0:
5991+
version "0.14.0"
5992+
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45"
5993+
integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==
5994+
59815995
regenerator-transform@^0.13.3:
59825996
version "0.13.4"
59835997
resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.4.tgz#18f6763cf1382c69c36df76c6ce122cc694284fb"

0 commit comments

Comments
 (0)