Skip to content
New issue

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

Cannot use proper REV values with vCARD 3.0 #540

Closed
dilyanpalauzov opened this issue Sep 28, 2022 · 4 comments
Closed

Cannot use proper REV values with vCARD 3.0 #540

dilyanpalauzov opened this issue Sep 28, 2022 · 4 comments

Comments

@dilyanpalauzov
Copy link
Contributor

In VCARD 3.0 the REV property has the format:

REV:1995-10-31T22:27:10Z

In VCARD 4.0 the REV property has the format:

REV:19951031T222710Z

For me it seems impossible to add a property of format YYYY-MM-DDTHH:MM:SSZ to using .addPropertyWithValue() as the value is always converted to the YYYYMMDDTHHMMSSZ format. But I want to create VCARD 3.0.

@kewisch
Copy link
Owner

kewisch commented May 2, 2024

@dilyanpalauzov do you have a test case for this? I tried this with both 3.0 and 4.0 and it seems to simply add it with the format advised?

    let x = ICAL.parse("BEGIN:VCARD\nVERSION:3.0\nEND:VCARD");
    let comp = new ICAL.Component(x);

    comp.addPropertyWithValue("rev", "1995-10-31T22:27:10Z");
    console.log(comp.toJSON());

@kewisch kewisch added the needinfo More information has been requested label May 2, 2024
@dilyanpalauzov
Copy link
Contributor Author

As far as I remember the problem was that it was not possible to specify, if the output shall be VCARD 3.0 or 4.0.

@github-actions github-actions bot removed the needinfo More information has been requested label May 2, 2024
@kewisch
Copy link
Owner

kewisch commented May 4, 2024

Looking at https://www.rfc-editor.org/rfc/rfc2425 section 5.8.4, it looks like vcard3 "date", "time", and "date-time" values are defined as: "value types is based on a subset of the definitions in ISO 8601 standard". The examples also provide 19960811T123456Z. REV in rfc2426 doesn't put any further restrictions on the subset, it simply says "single date-time value".

Therefore I would say YYYYMMDDTHHMMSSZ is a valid vcard3 format. Did I get that right?

@kewisch kewisch added the needinfo More information has been requested label May 4, 2024
Copy link

github-actions bot commented Jun 4, 2024

It looks like we haven't heard back on this issue, therefore we are closing this issue. If this problem persists in the latest version of ical.js, please re-open this issue.

@github-actions github-actions bot closed this as completed Jun 4, 2024
@github-actions github-actions bot removed the needinfo More information has been requested label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants