We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rfc5545 says the notation of duration is:
dur-value = (["+"] / "-") "P" (dur-date / dur-time / dur-week) dur-date = dur-day [dur-time] dur-time = "T" (dur-hour / dur-minute / dur-second) dur-week = 1*DIGIT "W" dur-hour = 1*DIGIT "H" [dur-minute] dur-minute = 1*DIGIT "M" [dur-second] dur-second = 1*DIGIT "S" dur-day = 1*DIGIT "D"
For convenience, ignore the leading (["+"] / "-") "P" and use NUM to represent 1*DIGIT, then expand it:
(["+"] / "-") "P"
NUM
1*DIGIT
(dur-date)
NUM "D"
NUM "D" "T" NUM "H" [NUM "M" [NUM "S"]]
NUM "D" "T" NUM "M" [NUM "S"]
NUM "D" "T" NUM "S"
(dur-time)
"T" NUM "H" [NUM "M" [NUM "S"]]
"T" NUM "M" [NUM "S"]
"T" NUM "S"
(dur-week)
NUM "W"
Thus, the conclusion is
In current implementation of ical.js, the order is ignored and dur-week could appear while dur-date or dur-time is displayed.
parseDurationChunk(...) do not respect conclusion#1, just assume the input string follow the rfc5545 spec.
parseDurationChunk(...)
ical.js/lib/ical/duration.js
Line 350 in 04e437a
toString() do not respect conclusion#2, but after normalize() called would be fine.
toString()
normalize()
Line 276 in 04e437a
Line 277 in 04e437a
The text was updated successfully, but these errors were encountered:
Thanks for reporting, your conclusions seem right to me as well. Let's see if we can fix toString as well!
Sorry, something went wrong.
No branches or pull requests
rfc5545 says the notation of duration is:
For convenience, ignore the leading
(["+"] / "-") "P"
and useNUM
to represent1*DIGIT
, then expand it:(dur-date)
NUM "D"
NUM "D" "T" NUM "H" [NUM "M" [NUM "S"]]
NUM "D" "T" NUM "M" [NUM "S"]
NUM "D" "T" NUM "S"
(dur-time)
"T" NUM "H" [NUM "M" [NUM "S"]]
"T" NUM "M" [NUM "S"]
"T" NUM "S"
(dur-week)
NUM "W"
Thus, the conclusion is
In current implementation of ical.js, the order is ignored and dur-week could appear while dur-date or dur-time is displayed.
parseDurationChunk(...)
do not respect conclusion#1, just assume the input string follow the rfc5545 spec.ical.js/lib/ical/duration.js
Line 350 in 04e437a
toString()
do not respect conclusion#2, but afternormalize()
called would be fine.ical.js/lib/ical/duration.js
Line 276 in 04e437a
ical.js/lib/ical/duration.js
Line 277 in 04e437a
The text was updated successfully, but these errors were encountered: