Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ npm install @bernagl/react-native-date react-native-nitro-modules
cd ios && pod install
```

**Requirements:** React Native 0.76+ (New Architecture) • Nitro Modules 0.35.x • iOS 13.0+ • Android API 24+
**Requirements:** React Native 0.76+ (New Architecture) • Nitro Modules 0.37.x • iOS 13.0+ • Android API 24+

## Is this library for you?

Expand Down
6 changes: 3 additions & 3 deletions docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ All functions accept flexible date inputs and return timestamps (milliseconds si
type DateInput = number | string | Date;
```

::: warning v3.0 Native Requirement
v3.0 requires `react-native-nitro-modules >=0.35.0 <0.36.0`. Reinstall pods and rebuild native apps after upgrading.
::: warning v4.0 Native Requirement
v4.0 requires `react-native-nitro-modules >=0.37.0 <0.38.0`. Reinstall pods and rebuild native apps after upgrading.

See [Release Notes](https://github.com/bbernag/react-native-date/blob/main/packages/native-date/RELEASE_NOTES_v3.0.0.md) for migration steps.
See [Release Notes](https://github.com/bbernag/react-native-date/blob/main/packages/native-date/RELEASE_NOTES_v4.0.0.md) for migration steps.
:::

::: warning v2.0 Breaking Changes
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ import { nativeDate } from '@bernagl/react-native-date/chain';
| iOS | 13.0+ |
| Android | API 24+ (Android 7.0) |
| React Native | 0.76+ (New Architecture) |
| Nitro Modules | 0.35.x |
| Nitro Modules | 0.37.x |

---

Expand Down
2 changes: 1 addition & 1 deletion packages/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"luxon": "^3.5.0",
"react": "19.1.0",
"react-native": "0.81.1",
"react-native-nitro-modules": "0.35.7"
"react-native-nitro-modules": "0.37.1"
},
"devDependencies": {
"@babel/core": "^7.25.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/expo-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"expo-status-bar": "~3.0.9",
"react": "19.1.0",
"react-native": "0.81.5",
"react-native-nitro-modules": "0.35.7"
"react-native-nitro-modules": "0.37.1"
},
"devDependencies": {
"@types/react": "~19.1.0",
Expand Down
17 changes: 16 additions & 1 deletion packages/native-date/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [4.0.0] - 2026-10-01

### Changed

- Upgrade Nitro Modules and Nitrogen generation to 0.37.1.
- Require `react-native-nitro-modules >=0.37.0 <0.38.0` for native integration.
- Validate the existing native spec against Nitrogen 0.37.1: the generated code is identical to Nitrogen 0.35.7.

### Migration

- Upgrade consuming apps to a Nitro Modules 0.37.x release.
- Reinstall iOS pods and rebuild native apps after upgrading.
- Keep the JavaScript date API unchanged from v3.x.

## [3.0.0] - 2026-05-26

### Changed
Expand Down Expand Up @@ -58,6 +72,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Minimal bridge overhead with Nitro Modules
- Benchmark results show 2-22x improvement over date-fns/dayjs for various operations

[Unreleased]: https://github.com/bbernag/react-native-date/compare/v3.0.0...HEAD
[Unreleased]: https://github.com/bbernag/react-native-date/compare/v4.0.0...HEAD
[4.0.0]: https://github.com/bbernag/react-native-date/compare/v3.0.0...v4.0.0
[3.0.0]: https://github.com/bbernag/react-native-date/compare/v2.0.0...v3.0.0
[0.1.0]: https://github.com/bbernag/react-native-date/releases/tag/v0.1.0
4 changes: 2 additions & 2 deletions packages/native-date/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

High-performance native date library for React Native, powered by C++ and [Nitro Modules](https://nitro.margelo.com/).

> **v3.0 Native Requirement:** This release requires `react-native-nitro-modules >=0.35.0 <0.36.0`. See [RELEASE_NOTES_v3.0.0.md](./RELEASE_NOTES_v3.0.0.md) for migration steps.
> **v4.0 Native Requirement:** This release requires `react-native-nitro-modules >=0.37.0 <0.38.0`. See [RELEASE_NOTES_v4.0.0.md](./RELEASE_NOTES_v4.0.0.md) for migration steps.

> **v2.0 Breaking Changes:** `parse()` and getter functions now use local time for date-only strings (previously UTC). See [RELEASE_NOTES_v2.0.0.md](./RELEASE_NOTES_v2.0.0.md) for migration guide.

Expand All @@ -20,7 +20,7 @@ High-performance native date library for React Native, powered by C++ and [Nitro
## Requirements

- React Native 0.76+ (New Architecture required)
- Nitro Modules 0.35.x
- Nitro Modules 0.37.x
- iOS 13.0+
- Android SDK 24+

Expand Down
66 changes: 66 additions & 0 deletions packages/native-date/RELEASE_NOTES_v4.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Release Notes v4.0.0

## Highlights

This release upgrades the native integration to Nitro Modules 0.37 while keeping the JavaScript date API unchanged from v3.x.

The package now builds and publishes with:

- `react-native-nitro-modules` 0.37.1 for development and example validation
- `nitrogen` 0.37.1 for generated native specs
- `react-native-nitro-modules >=0.37.0 <0.38.0` as the public peer dependency

## Breaking Changes

### Nitro Modules 0.37.x Is Required

Consumers must install a Nitro Modules 0.37 release. Nitro Modules 0.35.x and 0.36.x are no longer compatible with this package version.

```bash
npm install @bernagl/react-native-date@4.0.0 react-native-nitro-modules@0.37.1
# or
yarn add @bernagl/react-native-date@4.0.0 react-native-nitro-modules@0.37.1
```

## Migration Guide

1. Upgrade the packages:

```bash
npm install @bernagl/react-native-date@4.0.0 react-native-nitro-modules@0.37.1
# or
yarn add @bernagl/react-native-date@4.0.0 react-native-nitro-modules@0.37.1
```

2. Reinstall iOS pods:

```bash
cd ios
pod install
```

3. Rebuild the native app:

```bash
npx react-native run-ios
npx react-native run-android
```

4. For Expo Dev Client apps, prebuild before running:

```bash
npx expo prebuild --clean
npx expo run:ios
npx expo run:android
```

Expo Go is not supported because this package includes native code.

## Compatibility Notes

- No JavaScript date API changes were introduced in v4.0.0.
- Existing v3.x parsing, formatting, timezone, locale, chain, and async APIs remain unchanged.
- The version bump is major because the native Nitro peer dependency changed.
- The peer range intentionally stops before Nitro Modules 0.38 until that line is validated.
- Nitrogen 0.37.1 generates byte-identical native code for the current spec as Nitrogen 0.35.7.
- Nitro Modules 0.36 and 0.37 change only the Nitro View pipeline and Kotlin/JNI internals; `NativeDate` is a plain C++ HybridObject and needs no source changes.
8 changes: 4 additions & 4 deletions packages/native-date/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bernagl/react-native-date",
"version": "3.0.0",
"version": "4.0.0",
"description": "The fastest date library for React Native. Powered by C++ and Nitro Modules.",
"sideEffects": false,
"main": "./lib/module/index.js",
Expand Down Expand Up @@ -114,20 +114,20 @@
"eslint-plugin-react-native": "^5.0.0",
"jest": "^30.2.0",
"lefthook": "^2.0.3",
"nitrogen": "0.35.7",
"nitrogen": "0.37.1",
"prettier": "^2.8.8",
"react": "19.1.0",
"react-native": "0.81.1",
"react-native-builder-bob": "^0.40.16",
"react-native-nitro-modules": "0.35.7",
"react-native-nitro-modules": "0.37.1",
"ts-jest": "^29.4.6",
"turbo": "^2.5.6",
"typescript": "^5.9.2"
},
"peerDependencies": {
"react": "*",
"react-native": "*",
"react-native-nitro-modules": ">=0.35.0 <0.36.0"
"react-native-nitro-modules": ">=0.37.0 <0.38.0"
},
"react-native-builder-bob": {
"source": "src",
Expand Down
39 changes: 23 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1811,19 +1811,19 @@ __metadata:
eslint-plugin-react-native: "npm:^5.0.0"
jest: "npm:^30.2.0"
lefthook: "npm:^2.0.3"
nitrogen: "npm:0.35.7"
nitrogen: "npm:0.37.1"
prettier: "npm:^2.8.8"
react: "npm:19.1.0"
react-native: "npm:0.81.1"
react-native-builder-bob: "npm:^0.40.16"
react-native-nitro-modules: "npm:0.35.7"
react-native-nitro-modules: "npm:0.37.1"
ts-jest: "npm:^29.4.6"
turbo: "npm:^2.5.6"
typescript: "npm:^5.9.2"
peerDependencies:
react: "*"
react-native: "*"
react-native-nitro-modules: ">=0.35.0 <0.36.0"
react-native-nitro-modules: ">=0.37.0 <0.38.0"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -4023,7 +4023,7 @@ __metadata:
expo-status-bar: "npm:~3.0.9"
react: "npm:19.1.0"
react-native: "npm:0.81.5"
react-native-nitro-modules: "npm:0.35.7"
react-native-nitro-modules: "npm:0.37.1"
typescript: "npm:~5.9.2"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -4053,7 +4053,7 @@ __metadata:
react-native: "npm:0.81.1"
react-native-builder-bob: "npm:^0.40.16"
react-native-monorepo-config: "npm:^0.1.9"
react-native-nitro-modules: "npm:0.35.7"
react-native-nitro-modules: "npm:0.37.1"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -11516,18 +11516,18 @@ __metadata:
languageName: node
linkType: hard

"nitrogen@npm:0.35.7":
version: 0.35.7
resolution: "nitrogen@npm:0.35.7"
"nitrogen@npm:0.37.1":
version: 0.37.1
resolution: "nitrogen@npm:0.37.1"
dependencies:
chalk: "npm:^5.3.0"
react-native-nitro-modules: "npm:^0.35.7"
react-native-nitro-modules: "npm:^0.37.1"
ts-morph: "npm:^28.0.0"
yargs: "npm:^18.0.0"
zod: "npm:^4.0.5"
zod: "npm:^4.4.3"
bin:
nitrogen: lib/index.js
checksum: 10c0/1dd8fe72c5d90991038571fc3009489802f0b8d2c760db40cc83b119576e122c5e22a22b0391f0e4cb6fdb178fc389f143c9b16b67be80a14e4617832a6f7fab
checksum: 10c0/2f0aef19427a58dde9c3e9da9151381c21e0479c0e7fceb55131039201113f3eacd8c5cc01e5b408d4ba86dba8d9a7210d7189144cc35fdde83db950f34c29bd
languageName: node
linkType: hard

Expand Down Expand Up @@ -12469,13 +12469,13 @@ __metadata:
languageName: node
linkType: hard

"react-native-nitro-modules@npm:0.35.7, react-native-nitro-modules@npm:^0.35.7":
version: 0.35.7
resolution: "react-native-nitro-modules@npm:0.35.7"
"react-native-nitro-modules@npm:0.37.1, react-native-nitro-modules@npm:^0.37.1":
version: 0.37.1
resolution: "react-native-nitro-modules@npm:0.37.1"
peerDependencies:
react: "*"
react-native: "*"
checksum: 10c0/f0c9167655032952bfdadd6802eade60796df2021e29a451ec205843dd6e95c6cb274d77c77534703a5d5d55e45c6f7ca1900a94813de3e0bdb0f3aa654cf3fc
checksum: 10c0/5178f2ee891cb746b084fdf382b6020e366d8e4a81922a3f1d60a453d34fca6ebb1b00c4c28785c36385bc182ab76a30cba70441c39abbc25d3ad54db612e46e
languageName: node
linkType: hard

Expand Down Expand Up @@ -15121,13 +15121,20 @@ __metadata:
languageName: node
linkType: hard

"zod@npm:^3.25.0 || ^4.0.0, zod@npm:^4.0.5":
"zod@npm:^3.25.0 || ^4.0.0":
version: 4.3.5
resolution: "zod@npm:4.3.5"
checksum: 10c0/5a2db7e59177a3d7e202543f5136cb87b97b047b77c8a3d824098d3fa8b80d3aa40a0a5f296965c3b82dfdccdd05dbbfacce91347f16a39c675680fd7b1ab109
languageName: node
linkType: hard

"zod@npm:^4.4.3":
version: 4.6.5
resolution: "zod@npm:4.6.5"
checksum: 10c0/32eb6c5e98becbe045675b2141c3611451c16ba567f9779231d79af41c4d651ca1c22f154aef7e6c6e77b929f23e43f1154ca05b82e119e922353725d6776af5
languageName: node
linkType: hard

"zwitch@npm:^2.0.4":
version: 2.0.4
resolution: "zwitch@npm:2.0.4"
Expand Down