You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using [email protected] on macOS Monterey 12.5
node v16.13.2 (npm v8.1.2)
When I try to import datetime from rrule I got undefined
My import statement:
importdatetimefrom'rrule';
console.log('datetime', datetime);
/* ! * node_modules/rrule/dist/esm/index.js * * rrule.js - Library for working with recurrence rules for calendar dates. * https://github.com/jakubroztocil/rrule * * Copyright 2010, Jakub Roztocil and Lars Schoning * Licenced under the BSD licence. * https://github.com/jakubroztocil/rrule/blob/master/LICENCE * * Based on: * python-dateutil - Extensions to the standard Python datetime module. * Copyright (c) 2003-2011 - Gustavo Niemeyer <[email protected]> * Copyright (c) 2012 - Tomi Pieviläinen <[email protected]> * https://github.com/jakubroztocil/rrule/blob/master/LICENCE * */export{RRule}from'./rrule';export{RRuleSet}from'./rruleset';export{rrulestr}from'./rrulestr';export{Frequency}from'./types';export{Weekday}from'./weekday';//# sourceMappingURL=index.js.map
It seems a lot has changed since the documentation was written! Including breaking changes around 2.7.0 according to the change log.
My workaround:
Do not use eg: datetime(2012, 12, 31) use new Date(Date.UTC(2012, 12 - 1, 31)) and manipulate dates with Date prototypes.
I am using [email protected] on macOS Monterey 12.5
node v16.13.2 (npm v8.1.2)
When I try to import datetime from rrule I got undefined
My import statement:
I also reproduced this on runkit
https://runkit.com/ayhid/runkit-npm-rrule
I don't see datetime exported there, am I missing something here ?
The text was updated successfully, but these errors were encountered: