Socket
Socket
Sign inDemoInstall

js-joda

Package Overview
Dependencies
0
Maintainers
2
Versions
63
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.10.1 to 1.11.0

9

CHANGELOG.md

@@ -6,2 +6,11 @@ Changelog

### 1.11.0
* Added ts defs for new methods in DayOfWeek and Month #301
* add method params for #appendValue and #appendValueReduced #288
* add type definition for ChronoUnit.NANOS #296
* Add ZoneRulesProvider TypeScript definition #317
* Add type definition for Instant.atZone #313
### 1.10.1

@@ -8,0 +17,0 @@

37

dist/js-joda.d.ts

@@ -51,2 +51,4 @@ declare namespace JSJoda {

compareTo(other: DayOfWeek): number
equals(other: any): boolean

@@ -214,2 +216,4 @@

atZone(zone: ZoneId): ZonedDateTime
compareTo(otherInstant: Instant): number

@@ -282,2 +286,10 @@

class SignStyle {
static NORMAL: SignStyle;
static NEVER: SignStyle;
static ALWAYS: SignStyle;
static EXCEEDS_PAD: SignStyle;
static NOT_NEGATIVE: SignStyle;
}
class DateTimeFormatter {

@@ -341,5 +353,5 @@ static ISO_LOCAL_DATE: DateTimeFormatter

appendValue(): DateTimeFormatterBuilder
appendValue(field: TemporalField, width?: number, maxWidth?: number, signStyle?: SignStyle): DateTimeFormatterBuilder
appendValueReduced(): DateTimeFormatterBuilder
appendValueReduced(field: TemporalField, width: number, maxWidth: number, base: ChronoLocalDate | number): DateTimeFormatterBuilder

@@ -534,2 +546,4 @@ appendZoneId(): DateTimeFormatterBuilder

static valueOf(name: string): Month
static values(): Month[]

@@ -541,2 +555,6 @@

compareTo(other: Month): number
equals(other: Month): boolean
firstDayOfYear(leapYear: boolean): number

@@ -562,2 +580,6 @@

name(): string
ordinal(): number
plus(months: number): Month

@@ -713,2 +735,3 @@

class ChronoUnit extends TemporalUnit {
static NANOS: ChronoUnit
static MICROS: ChronoUnit

@@ -1668,4 +1691,14 @@ static MILLIS: ChronoUnit

}
class ZoneRulesProvider {
static getRules(zoneId: string): ZoneRules
static getAvailableZoneIds(): string[]
}
class DateTimeException extends Error {
constructor(message?: string)
}
}
export = JSJoda;

2

package.json
{
"name": "js-joda",
"version": "1.10.1",
"version": "1.11.0",
"description": "a date and time library for javascript",

@@ -5,0 +5,0 @@ "repository": {

@@ -19,3 +19,3 @@ # Immutable date and time library for JavaScript

- js-joda supports **ECMAScript 5** browsers down to ie9.
- js-joda supports **ECMAScript 5** browsers down to IE9.

@@ -34,13 +34,13 @@ - js-joda is a **port of the threeten** backport, which is the base for JSR-310 implementation of the Java SE 8 java.time package. Threeten is inspired by **Joda-Time**, having similar concepts and the same author.

## The threeten domain models
## The ThreeTen domain models
### Dates and Times
- **LocalDate** represents a date without a time and time-zone in the ISO-8601 calendar system, such as 2007-12-24.
- **LocalDate** represents a date without a time and timezone in the ISO-8601 calendar system, such as 2007-12-24.
- **LocalTime** represents a time without time-zone in the ISO-8601 calendar system such as '11:55:00'.
- **LocalTime** represents a time without timezone in the ISO-8601 calendar system such as '11:55:00'.
- **LocalDateTime** is a description of the date (LocalDate), as used for birthdays, combined with the local time (LocalTime) as seen on a wall clock.
- **ZonedDateTime** is a date-time with a time-zone in the ISO-8601 calendar system, such as 2007-12-24T16:15:30+01:00 UTC+01:00.
- **ZonedDateTime** is a date-time with a timezone in the ISO-8601 calendar system, such as 2007-12-24T16:15:30+01:00 UTC+01:00.

@@ -73,9 +73,13 @@ - **Instant** is an instantaneous point on the time-line measured from the epoch of _1970-01-01T00:00:00Z_ in epoch-seconds and nanosecond-of-second.

npm install js-joda
```
npm install js-joda
```
Then require it to any module
var LocalDate = require('js-joda').LocalDate;
```js
var LocalDate = require('js-joda').LocalDate;
var d = LocalDate.parse('2012-12-24').atStartOfDay().plusMonths(2); // 2013-02-24T00:00:00
var d = LocalDate.parse('2012-12-24').atStartOfDay().plusMonths(2); // 2013-02-24T00:00:00
```

@@ -86,7 +90,9 @@ ### Browser

<script src="js-joda.min.js"></script>
<script>
var LocalDate = JSJoda.LocalDate;
var d = LocalDate.parse('2012-12-24').atStartOfDay().plusMonths(2); // 2013-02-24T00:00:00
</script>
```html
<script src="js-joda.min.js"></script>
<script>
var LocalDate = JSJoda.LocalDate;
var d = LocalDate.parse('2012-12-24').atStartOfDay().plusMonths(2); // 2013-02-24T00:00:00
</script>
```

@@ -103,3 +109,3 @@ ## Documentation

- Support for the domain models `LocalDate`, `LocalDateTime`, `ZonedDateTime`, `Instant`, `Duration` and `Period` converting to and from ISO8601.
- `ZonedDateTime` (without support for loading iana time-zone databases) currently supports only fixed offsets like UTC or UTC+02:00 and the system default time zone.
- `ZonedDateTime` (without support for loading iana timezone databases) currently supports only fixed offsets like UTC or UTC+02:00 and the system default time zone.

@@ -106,0 +112,0 @@ ### Milestone 2: IANA timezone support (reached with version v1.2.0)

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

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc