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

Use native Date.prototype.toISOString() if it's available #108

Open
RA80533 opened this issue Apr 4, 2021 · 1 comment
Open

Use native Date.prototype.toISOString() if it's available #108

RA80533 opened this issue Apr 4, 2021 · 1 comment
Labels

Comments

@RA80533
Copy link

RA80533 commented Apr 4, 2021

next_child.ele('date').txt(ISODateString(new Date(next)));

if (typeof Date.prototype.toISOString === "function") {
    next_child.ele('date').txt(new Date(next).toISOString());
} else {
    next_child.ele('date').txt(toISOString(new Date(next));
}
@mreinstein
Copy link
Collaborator

I would accept a PR For this that just uses Date.prototype.toISOString everywhere. We're going to assume much more javascript runtime for plist.js v4

@mreinstein mreinstein added the v4 label Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants