Socket
Socket
Sign inDemoInstall

dateformat

Package Overview
Dependencies
0
Maintainers
4
Versions
42
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.1 to 3.0.2

2

package.json

@@ -13,3 +13,3 @@ {

],
"version": "3.0.1",
"version": "3.0.2",
"license": "MIT",

@@ -16,0 +16,0 @@ "main": "lib/dateformat",

@@ -130,7 +130,29 @@ # dateformat

## Breaking change in 2.1.0
2.1.0 was published with a breaking change for those using localized strings.
2.2.0 has been published without the change to keep packages refering to ^2.0.0 to continue working.
3.0.* contains the localized AM/PM change.
### Localization
Day names, month names and the AM/PM indicators can be localized by
passing an object with the necessary strings. For example:
```js
var dateFormat = require('dateformat');
dateFormat.i18n = {
dayNames: [
'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat',
'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'
],
monthNames: [
'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec',
'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'
],
timeNames: [
'a', 'p', 'am', 'pm', 'A', 'P', 'AM', 'PM'
]
};
```
> Notice that only one language is supported at a time and all strings
> *must* be present in the new value.
### Breaking change in 2.1.0
- 2.1.0 was published with a breaking change, for those using localized strings.
- 2.2.0 has been published without the change, to keep packages refering to ^2.0.0 to continue working. This is now branch v2_2.
- 3.0.* contains the localized AM/PM change.
## License

@@ -137,0 +159,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc