Socket
Socket
Sign inDemoInstall

js-joda

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-joda - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

4

CheatSheet.md
js-joda Cheat sheet
=============================================
[For a detailed API Reference refer to the ESDoc generated docs](https://doc.esdoc.org/github.com/js-joda/js-joda/)
[For a detailed API Reference refer to the ESDoc generated docs](//js-joda.github.io/js-joda/esdoc/)

@@ -924,3 +924,3 @@ ## Table of content

// build a custom date time formatter where the time field is optional
var OPTIONAL_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd['T'HH:mm:ss]")
var OPTIONAL_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd['T'HH:mm[:ss]]")

@@ -927,0 +927,0 @@ // create a temporal query that create a new Temporal depending on the existing fields

{
"name": "js-joda",
"version": "1.1.1",
"version": "1.1.2",
"description": "a date and time library for javascript",

@@ -16,7 +16,7 @@ "repository": {

"test-ci": "npm run build-dist && npm run test && npm run test-browser -- --browsers \"Firefox,PhantomJS\" && npm run build-esdoc && npm run test-coverage",
"build-esdoc": " ./node_modules/.bin/esdoc -c esdoc.json",
"build-esdoc": "./node_modules/.bin/esdoc -c esdoc.json",
"build-dist-es5": "./node_modules/.bin/babel src -d build/es5",
"build-dist": "./node_modules/.bin/webpack --progress --colors --bail && DIST_MIN=1 ./node_modules/.bin/webpack --progress --colors --bail",
"build-md-toc": "./node_modules/.bin/markdown-toc -i CheatSheet.md",
"build-gz-check": "gzip -kf dist/js-joda.min.js && ls -al ./dist/js-joda.min.js*"
"build-gz-check": "gzip -kf dist/js-joda.min.js && ls -al ./dist/js-joda.min.js*"
},

@@ -31,4 +31,4 @@ "keywords": [

"devDependencies": {
"babel-cli": "^6.6.5",
"babel-core": "^6.7.4",
"babel-cli": "^6.8.0",
"babel-core": "^6.8.0",
"babel-loader": "^6.2.4",

@@ -38,6 +38,6 @@ "babel-preset-es2015": "^6.6.0",

"chai": "^3.5.0",
"coveralls": "^2.11.8",
"esdoc": "^0.4.6",
"eslint": "^2.4.0",
"eslint-config-standard": "^5.1.0",
"coveralls": "^2.11.9",
"esdoc": "0.4.6",
"eslint": "^2.9.0",
"eslint-config-standard": "^5.3.1",
"eslint-plugin-promise": "^1.1.0",

@@ -48,14 +48,14 @@ "eslint-plugin-standard": "^1.3.2",

"karma-chai-plugins": "^0.7.0",
"karma-chrome-launcher": "^0.2.3",
"karma-firefox-launcher": "^0.1.7",
"karma-mocha": "^0.2.2",
"karma-chrome-launcher": "^1.0.1",
"karma-firefox-launcher": "^1.0.0",
"karma-mocha": "^1.0.1",
"karma-phantomjs-launcher": "^1.0.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.7.0",
"markdown-toc": "^0.12.5",
"markdown-toc": "^0.12.9",
"mocha": "^2.4.5",
"phantomjs-prebuilt": "^2.1.6",
"webpack": "^1.12.14"
"phantomjs-prebuilt": "^2.1.7",
"webpack": "^1.13.0"
},
"license": "BSD-3-Clause"
}

@@ -98,3 +98,3 @@ Immutable date and time library for javascript

+ [Cheat Sheet](CheatSheet.md) Quick start guide
+ [API](https://doc.esdoc.org/github.com/js-joda/js-joda/) ESDoc generated API documentation hosted by the ESDoc Hosting Service
+ [API](//js-joda.github.io/js-joda/esdoc/) ESDoc generated API documentation
+ [js-joda Homepage](http://js-joda.github.io/js-joda/) Project homepage

@@ -101,0 +101,0 @@

@@ -122,6 +122,5 @@ /**

* This method will create a formatter based on a simple pattern of letters and symbols.
* For example, {@code d MMM yyyy} will format 2011-12-03 as '3 Dec 2011'.
* <p>
* The returned formatter will use the default locale, but this can be changed
* using {@link DateTimeFormatter#withLocale(Locale)}.
* using {@link DateTimeFormatter.withLocale}.
* <p>

@@ -131,44 +130,44 @@ * All letters 'A' to 'Z' and 'a' to 'z' are reserved as pattern letters.

* <pre>
* Symbol Meaning Presentation Examples
* ------ ------- ------------ -------
* G era number/text 1; 01; AD; Anno Domini
* y year year 2004; 04
* D day-of-year number 189
* M month-of-year number/text 7; 07; Jul; July; J
* d day-of-month number 10
*
* Q quarter-of-year number/text 3; 03; Q3
* Y week-based-year year 1996; 96
* w week-of-year number 27
* W week-of-month number 27
* e localized day-of-week number 2; Tue; Tuesday; T
* E day-of-week number/text 2; Tue; Tuesday; T
* F week-of-month number 3
*
* a am-pm-of-day text PM
* h clock-hour-of-am-pm (1-12) number 12
* K hour-of-am-pm (0-11) number 0
* k clock-hour-of-am-pm (1-24) number 0
*
* H hour-of-day (0-23) number 0
* m minute-of-hour number 30
* s second-of-minute number 55
* S fraction-of-second fraction 978
* A milli-of-day number 1234
* n nano-of-second number 987654321
* N nano-of-day number 1234000000
*
* V time-zone ID zone-id America/Los_Angeles; Z; -08:30
* z time-zone name zone-name Pacific Standard Time; PST
* X zone-offset 'Z' for zero offset-X Z; -08; -0830; -08:30; -083015; -08:30:15;
* x zone-offset offset-x +0000; -08; -0830; -08:30; -083015; -08:30:15;
* Z zone-offset offset-Z +0000; -0800; -08:00;
*
* p pad next pad modifier 1
*
* ' escape for text delimiter
* '' single quote literal '
* [ optional section start
* ] optional section end
* {} reserved for future use
* |Symbol |Meaning |Presentation |Examples
* |--------|----------------------------|------------------|----------------------------------------------------
* | G | era | number/text | 1; 01; AD; Anno Domini
* | y | year | year | 2004; 04
* | D | day-of-year | number | 189
* | M | month-of-year | number/text | 7; 07; Jul; July; J
* | d | day-of-month | number | 10
* | | | |
* | Q | quarter-of-year | number/text | 3; 03; Q3
* | Y | week-based-year | year | 1996; 96
* | w | week-of-year | number | 27
* | W | week-of-month | number | 27
* | e | localized day-of-week | number | 2; Tue; Tuesday; T
* | E | day-of-week | number/text | 2; Tue; Tuesday; T
* | F | week-of-month | number | 3
* | | | |
* | a | am-pm-of-day | text | PM
* | h | clock-hour-of-am-pm (1-12) | number | 12
* | K | hour-of-am-pm (0-11) | number | 0
* | k | clock-hour-of-am-pm (1-24) | number | 0
* | | | |
* | H | hour-of-day (0-23) | number | 0
* | m | minute-of-hour | number | 30
* | s | second-of-minute | number | 55
* | S | fraction-of-second | fraction | 978
* | A | milli-of-day | number | 1234
* | n | nano-of-second | number | 987654321
* | N | nano-of-day | number | 1234000000
* | | | |
* | V | time-zone ID | zone-id | America/Los_Angeles; Z; -08:30
* | z | time-zone name | zone-name | Pacific Standard Time; PST
* | X | zone-offset 'Z' for zero | offset-X | Z; -08; -0830; -08:30; -083015; -08:30:15;
* | x | zone-offset | offset-x | +0000; -08; -0830; -08:30; -083015; -08:30:15;
* | Z | zone-offset | offset-Z | +0000; -0800; -08:00;
* | | | |
* | p | pad next | pad modifier | 1
* | | | |
* | ' | escape for text | delimiter |
* | '' | single quote | literal | '
* | [ | optional section start | |
* | ] | optional section end | |
* | {} | reserved for future use | |
* </pre>

@@ -178,16 +177,18 @@ * <p>

* <p>
* <b>Text</b>: The text style is determined based on the number of pattern letters used.
* Less than 4 pattern letters will use the {@link TextStyle#SHORT short form}.
* Exactly 4 pattern letters will use the {@link TextStyle#FULL full form}.
* Exactly 5 pattern letters will use the {@link TextStyle#NARROW narrow form}.
* **Text**: The text style is determined based on the number of pattern letters used.
* Less than 4 pattern letters will use the short form `TextStyle.SHORT`.
* Exactly 4 pattern letters will use the full form `TextStyle.FULL`.
* Exactly 5 pattern letters will use the narrow form `TextStyle.NARROW`.
* <p>
* <b>Number</b>: If the count of letters is one, then the value is printed using the minimum number
* of digits and without padding as per {@link DateTimeFormatterBuilder#appendValue(TemporalField)}.
* **NOTE**: since text styles require locale support, they are currently not supported in js-joda!
* <p>
* **Number**: If the count of letters is one, then the value is printed using the minimum number
* of digits and without padding as per {@link DateTimeFormatterBuilder.appendValue}.
* Otherwise, the count of digits is used as the width of the output field as per
* {@link DateTimeFormatterBuilder#appendValue(TemporalField, int)}.
* {@link DateTimeFormatterBuilder.appendValue}.
* <p>
* <b>Number/Text</b>: If the count of pattern letters is 3 or greater, use the Text rules above.
* **Number/Text**: If the count of pattern letters is 3 or greater, use the Text rules above.
* Otherwise use the Number rules above.
* <p>
* <b>Fraction</b>: Outputs the nano-of-second field as a fraction-of-second.
* **Fraction**: Outputs the nano-of-second field as a fraction-of-second.
* The nano-of-second value has nine digits, thus the count of pattern letters is from 1 to 9.

@@ -200,4 +201,4 @@ * If it is less than 9, then the nano-of-second value is truncated, with only the most

* <p>
* <b>Year</b>: The count of letters determines the minimum field width below which padding is used.
* If the count of letters is two, then a {@link DateTimeFormatterBuilder#appendValueReduced reduced}
* **Year**: The count of letters determines the minimum field width below which padding is used.
* If the count of letters is two, then a {@link DateTimeFormatterBuilder.appendValueReduced}
* two digit form is used.

@@ -207,15 +208,17 @@ * For printing, this outputs the rightmost two digits. For parsing, this will parse using the

* If the count of letters is less than four (but not two), then the sign is only output for negative
* years as per {@link SignStyle#NORMAL}.
* Otherwise, the sign is output if the pad width is exceeded, as per {@link SignStyle#EXCEEDS_PAD}
* years as per `SignStyle.NORMAL`.
* Otherwise, the sign is output if the pad width is exceeded, as per `SignStyle.EXCEEDS_PAD`
* <p>
* <b>ZoneId</b>: This outputs the time-zone ID, such as 'Europe/Paris'.
* **ZoneId**: This outputs the time-zone ID, such as 'Europe/Paris'.
* If the count of letters is two, then the time-zone ID is output.
* Any other count of letters throws {@code IllegalArgumentException}.
* Any other count of letters throws `IllegalArgumentException`.
* <p>
* <b>Zone names</b>: This outputs the display name of the time-zone ID.
* **Zone names**: This outputs the display name of the time-zone ID.
* If the count of letters is one, two or three, then the short name is output.
* If the count of letters is four, then the full name is output.
* Five or more letters throws {@code IllegalArgumentException}.
* Five or more letters throws `IllegalArgumentException`.
* <p>
* <b>Offset X and x</b>: This formats the offset based on the number of pattern letters.
* **NOTE**: since zone ids and name require the iana tzdb, they are currently not supported in js-joda!
* <p>
* **Offset X and x**: This formats the offset based on the number of pattern letters.
* One letter outputs just the hour', such as '+01', unless the minute is non-zero

@@ -227,17 +230,17 @@ * in which case the minute is also output, such as '+0130'.

* Five letters outputs the hour and minute and optional second, with a colon, such as '+01:30:15'.
* Six or more letters throws {@code IllegalArgumentException}.
* Six or more letters throws `IllegalArgumentException`.
* Pattern letter 'X' (upper case) will output 'Z' when the offset to be output would be zero,
* whereas pattern letter 'x' (lower case) will output '+00', '+0000', or '+00:00'.
* <p>
* <b>Offset Z</b>: This formats the offset based on the number of pattern letters.
* **Offset Z**: This formats the offset based on the number of pattern letters.
* One, two or three letters outputs the hour and minute, without a colon, such as '+0130'.
* Four or more letters throws {@code IllegalArgumentException}.
* Four or more letters throws `IllegalArgumentException`.
* The output will be '+0000' when the offset is zero.
* <p>
* <b>Optional section</b>: The optional section markers work exactly like calling
* {@link DateTimeFormatterBuilder#optionalStart()} and {@link DateTimeFormatterBuilder#optionalEnd()}.
* **Optional section**: The optional section markers work exactly like calling
* {@link DateTimeFormatterBuilder.optionalStart} and {@link DateTimeFormatterBuilder.optionalEnd}.
* <p>
* <b>Pad modifier</b>: Modifies the pattern that immediately follows to be padded with spaces.
* **Pad modifier**: Modifies the pattern that immediately follows to be padded with spaces.
* The pad width is determined by the number of pattern letters.
* This is the same as calling {@link DateTimeFormatterBuilder#padNext(int)}.
* This is the same as calling {@link DateTimeFormatterBuilder.padNext}.
* <p>

@@ -255,2 +258,6 @@ * For example, 'ppH' outputs the hour-of-day padded on the left with spaces to a width of 2.

* @see DateTimeFormatterBuilder#appendPattern(String)
* @example
* var s = LocalDate.parse('2016-04-01').format(DateTimeFormatter.ofPattern('d MM yyyy'));
* console.log(s); // '1 04 2016'
*
*/

@@ -356,3 +363,3 @@ static ofPattern(pattern) {

*/
withLocal(){
withLocale(){
return this;

@@ -359,0 +366,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc