jkbrzt / rrule

JavaScript library for working with recurrence rules for calendar dates as defined in the iCalendar RFC and more.
https://jkbrzt.github.io/rrule
Other
3.37k stars 517 forks source link

WKST and toString() #50

Closed chotiwat closed 6 years ago

chotiwat commented 10 years ago

According to the RFC 2445 and 5545, shouldn't the WKST values be converted to the format "MO", "TU", "WE", etc. when calling toString()? Currently WKST values will be outputted as number values which some calendar applications deem invalid.

jkbrzt commented 10 years ago

Can you show an example? I am unable to reproduce it.

var rule = new RRule({
  freq: RRule.WEEKLY,
  wkst: RRule.SU
});

rule.toString() => "FREQ=WEEKLY;WKST=SU;"
chotiwat commented 10 years ago

Oh, I specify an integer value for wkst when creating new RRule object like this:

var rule = new RRule({
  freq: RRule.WEEKLY,
  wkst: 6
});

rule.toString() => "FREQ=WEEKLY;WKST=6"
trippytango commented 8 years ago

Is this issue being looked at?

espen commented 6 years ago

Closing due to same as #187