lukejagodzinski / meteor-astronomy-validators

https://atmospherejs.com/jagi/astronomy-validators
MIT License
11 stars 13 forks source link

Date validator does not ensure ISODate #38

Open carlosbeneto opened 8 years ago

carlosbeneto commented 8 years ago

I'm guessing this might be by design but I thought I'd point it out.

When a date type isn't defined in the schema, but the field is given the date validator, when it comes to save(), the date gets stored in the database in milliseconds rather than an ISODate.

Thanks :)

lukejagodzinski commented 8 years ago

Hmm yes indeed. It's a bug that I could easily fix. Just don't know if it wouldn't break someone's code.

carlosbeneto commented 8 years ago

Personally I'd say that for consistency it'd be good to fix it, as at least in my experience dates always get stored as ISODate unless there's some other reason not to.

But that's only my experience (Which isn't very extensive). It'd be good to get some feedback from other users.

Keep up the good work though, really loving Astronomy!

lukejagodzinski commented 8 years ago

I've already fixed it and update is waiting to be published. I hope that no one will complain. If they will, then I will have to go back to the previous version.