chronical 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +9 -5
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -14,15 +14,19 @@ npm install chronical
14
14
 
15
15
  ```typescript
16
16
  import { RRuleSet } from "chronical";
17
- import { Temporal } from "temporal-polyfill";
18
17
 
19
- const dtStart = Temporal.ZonedDateTime.from("2025-01-01T00:00:00[UTC]");
20
- const rruleSet = new RRuleSet(dtStart);
18
+ const rruleSet = RRuleSet.fromString(
19
+ "DTSTART;TZID=Asia/Tokyo:20250101T000000\nRRULE:FREQ=DAILY;COUNT=3",
20
+ );
21
21
 
22
22
  // Get all occurrences
23
23
  const dates = rruleSet.all();
24
- console.log(dates); // [ ZonedDateTime [Temporal.ZonedDateTime] {} ]
25
- console.log(dates[0].toString()); // "2025-01-01T00:00:00+00:00[UTC]"
24
+ console.log(dates.map((d) => d.toString()));
25
+ // [
26
+ // "2025-01-01T00:00:00+09:00[Asia/Tokyo]",
27
+ // "2025-01-02T00:00:00+09:00[Asia/Tokyo]",
28
+ // "2025-01-03T00:00:00+09:00[Asia/Tokyo]",
29
+ // ]
26
30
  ```
27
31
 
28
32
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chronical",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "An implementation of RRule as defined in iCalendar (RFC 5545) using Temporal API written in Rust",
5
5
  "repository": {
6
6
  "type": "git",
@@ -46,12 +46,12 @@
46
46
  "node": ">= 20"
47
47
  },
48
48
  "optionalDependencies": {
49
- "chronical-darwin-arm64": "0.1.2",
50
- "chronical-win32-arm64-msvc": "0.1.2",
51
- "chronical-linux-arm64-gnu": "0.1.2",
52
- "chronical-darwin-x64": "0.1.2",
53
- "chronical-win32-x64-msvc": "0.1.2",
54
- "chronical-linux-x64-gnu": "0.1.2"
49
+ "chronical-darwin-arm64": "0.1.4",
50
+ "chronical-win32-arm64-msvc": "0.1.4",
51
+ "chronical-linux-arm64-gnu": "0.1.4",
52
+ "chronical-darwin-x64": "0.1.4",
53
+ "chronical-win32-x64-msvc": "0.1.4",
54
+ "chronical-linux-x64-gnu": "0.1.4"
55
55
  },
56
56
  "scripts": {
57
57
  "preinstall": "npx only-allow pnpm",