Giter Site home page Giter Site logo

rrule-rust's People

Contributors

dependabot[bot] avatar lsndr avatar tomquist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rrule-rust's Issues

Add `semantic-release`

Branches

  1. master for latest
  2. next for next

Flow

  1. Add reusable build & test workflow
  2. Create Release workflow
  3. Create Test workflow for PRs

Introduce `DtStart` object

This will represent DTSTART property, like RRule represents RRULE

class DtStart {
  datetime: DateTime;
  tzid: string;
}

Make enums non-const

Current behavior:

export const enum Frequency 

Desired behavior:

export enum Frequency 

This will require to create enum definition on TS side, since non-const enums are generated by napi-rs, so compatibility with TS is not guaranteed

Return custom date object instead of UNIX timestamp

Possible design:

class RRuleDate {
  day: number;
  month: number;
  year: number;
  hour: number;
  minute: number;
  second: number:

 toDate(): Date {}

 toUTCDate(): Date {}
}

Make sure this type is compatible with luxon's Date.fromObject method

relates-to: #37

Add `filter` method to `RRuleSet`

Motivation

Iteration over RRuleSet is much slower than using all function. Method filter can cover some of the iterator use cases. But it firstly requires research how fast it is.

Possible contract

public filter<S extends DateTime>(predicate: (value: DateTime, index: number) => value is S, limit?: number): DateTime[]

Not possible to create an RRuleSet with timezone "local"

With the new API it's not possible to create an RRuleSet with the timezone set to "local", e.g. this fails:

new RRuleSet(DateTime.create(2024, 1, 1, 0, 0, 0, false), "local");
// => Error: 'local' is not a valid timezone

The reason is that timezones always get parsed with chrono_tz and then passed into rrule::Tz::Tz. Should local and utc be treated as a special string to instruct the RRuleSet constructor to use rrule::Tz::LOCAL or rrule::Tz::UTC respectively?

Add e2e tests

  1. Write simple e2e tests using jest in e2e folder
  2. Add workflow which will be called manually against specified package version

Improve performance of `RRuleSet` iterator

At the moment it is much slower than calling set.all(). Iteration over set should not significantly differ from using all method.

This task requires:

  1. Research how to improve the performance
  2. Provide PR with perf improvement

Repsect `TZID` when parsing datetime in `EXDATE` and `RDATE`

As for now it would be enough just to respect the timezone. In future we will need to provide api to set exdate and rdate with custom timezone (or we won't need because according to RFC, TZID in EXDATE/RDATE should be the same as in DTSTART).

Spec:

https://icalendar.org/iCalendar-RFC-5545/3-8-5-1-exception-date-times.html
https://icalendar.org/iCalendar-RFC-5545/3-8-5-2-recurrence-date-times.html

Requirements:

  1. TZID should be used in calculations,
  2. TZID should be included in RRuleSet.toString() result (?)

Return JS Date instances instead of UNIX timestamps

I would like to discuss whether it would be better for the API to return JS date instances instead of UNIX timestamps. While this may make it slightly slower, it would also make it more convenient to use. In reality, it shouldn't have a significant impact since, on the JS side, timestamps would likely be converted into JS dates regardless. What was the main reason for choosing UNIX timestamps in the first place?

Add benchmark tests to CI

  1. Research expected performance range on ubuntu-latest
  2. Create a workflow, which run on the on each PR (only) on ubuntu-latest. Make it fail if its result is not in the expected range

Add `dist` folder

  1. Mode index.js and index.ts to dist folder
  2. Exclude dist from git (Not sure it's possible)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.