Skip to content

Commit

Permalink
fix: get parity up to date (#116)
Browse files Browse the repository at this point in the history
* fix date validation. (#96)

* Precision format (#98)

* Added TimeZone and Precision.

* Add formats to localize , add truncate, rework is

* Updated lock-file

Co-authored-by: Amanda Hwatz Björkholm <amanda.hwatz@paxport.net>

* FIxed typo and clearified weekday output (#99)

* Datetime (#100)

* Added Date.span.

* Added Date.span

* Modify datetime localize and change format.

* Change test to equal in DateTime test.

Co-authored-by: Benjamin Josefsson <benjamin.josefsson@paxport.net>
Co-authored-by: Amanda Hwatz Björkholm <amanda.hwatz@paxport.net>

* TimeSpan.toX() now works. (#102)

* Solve date bug with daylight saving time (#101)

* Is undefined (#103)

* Fixed is check!

* Added tests to test undefined.

* Add next weekday function (#104)

* Added invert function. (#105)

Co-authored-by: Anton Kroner <anton.korner@paxport.net>

* Add DateRange.toDates function (#106)

* Add date range to dates function

* Remove vulnerabilities

* Added isoly export, updated tests to use it. (#108)

* Added isoly export, updated tests to use it.

* Fixed vulnerably build dependencies.

* Replace NNBSP with space. (#109)

* Added IANA TimeZone-type. (#110)

* Renamed the former type `TimeZone` to `TimeZoneOffset`. (This should not be breaking, since it is not exported in `index.ts` and only internal type.)

* Change to existing code is the `TimeZone`-parameter for DateTime.localize which took what before was a `TimeZoneOffset`. However, this wasn't working. In reality it expected a IANA-timezone. (Else an error was thrown.)

* Added a `TimeZone` type for IANA-timezone identifiers. (Not strictly ISO-standard, but related to ISO 8601)

IANA-Timezone looks like this:
* `"Europe/Stockholm"`
* `"Europe/London"`
* `"UTC"`

* Add Kosovo, and refactor CountryCode (#111)

* Add Kosovo, and refactor CountryCode

* Remove console log.

* DateTime.span (#112)

* DateTime.span added parameter "greatestUnit"

* ci: version bump to release-2.0.19

* Introducing the fromLocalDateTime Function for Timezone Offset Handling (#113)

Datetime.fromLocalDateTime

* ci: version bump to release-2.0.20

* implemented firstOfYear (#114)

* implemented firstOfYear

* implemented lastOfYear

* 0 vulnerabilities

* ci: version bump to release-2.0.21

* fix: fixed bug with currency round (#115)

* fix: fixed bug with currency round

* fix: audit fix

* ci: version bump to release-2.0.22

---------

Co-authored-by: qijieye <86956109+qijieye@users.noreply.github.com>
Co-authored-by: Amanda Hwatz Björkholm <amandahwatz@gmail.com>
Co-authored-by: Amanda Hwatz Björkholm <amanda.hwatz@paxport.net>
Co-authored-by: Magnus Gustafsson <magnus@intergiro.com>
Co-authored-by: Benjamin Josefsson <92915807+benjaminjosefsson@users.noreply.github.com>
Co-authored-by: Benjamin Josefsson <benjamin.josefsson@paxport.net>
Co-authored-by: marcushanses <79835961+marcushanses@users.noreply.github.com>
Co-authored-by: AntonCroner <113976225+AntonCroner@users.noreply.github.com>
Co-authored-by: Anton Kroner <anton.korner@paxport.net>
Co-authored-by: Simon Mika <simonmika@users.noreply.github.com>
Co-authored-by: Lasse Löfquist <tvartom@users.noreply.github.com>
Co-authored-by: Automated Version Bump <gh-action-bump-version@users.noreply.github.com>
Co-authored-by: Elias Eriksson <elias@issuefab.com>
  • Loading branch information
14 people authored Jul 6, 2023
1 parent db6e3bf commit 6e04774
Show file tree
Hide file tree
Showing 26 changed files with 5,346 additions and 7,909 deletions.
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@
"LICENSE": true,
"tsconfig.*": true
},
"search.exclude": {
".*": false,
"*.json": false,
"CODEOWNERS": false,
"dist": false,
"README.md": false,
"LICENSE": false,
"tsconfig.*": false,
"node_modules": false,
"*.code-workspace": false
},
"files.insertFinalNewline": true,
"editor.tabSize": 2,
"editor.detectIndentation": false,
Expand Down
8 changes: 4 additions & 4 deletions CallingCode.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CallingCode } from "./CallingCode"
const commonlyUsedAreas: { [key: string]: CallingCode } = {
import { isoly } from "./index"
const commonlyUsedAreas: { [key: string]: isoly.CallingCode } = {
SE: "+46",
FI: "+358",
DE: "+49",
Expand All @@ -10,12 +10,12 @@ const commonlyUsedAreas: { [key: string]: CallingCode } = {
describe("CallingCode", () => {
it("seperate Swedish number", () => {
const phoneNumber = "+461570000000"
expect(CallingCode.seperate(phoneNumber)).toEqual(["+46", "1570000000"])
expect(isoly.CallingCode.seperate(phoneNumber)).toEqual(["+46", "1570000000"])
})
it("check common countries", () => {
for (const key in commonlyUsedAreas) {
const phoneNumber = commonlyUsedAreas[key] + "123456789"
expect(CallingCode.seperate(phoneNumber)).toEqual([commonlyUsedAreas[key], "123456789"])
expect(isoly.CallingCode.seperate(phoneNumber)).toEqual([commonlyUsedAreas[key], "123456789"])
}
})
})
Loading

0 comments on commit 6e04774

Please sign in to comment.