You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 24, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 24, 2026. It is now read-only.
Anyone found a way to handle Dates in Ionic production build? #36
Please has anyone found a way around the date datatype problem with ionic production builds. I am building an app which is date-centric and this limitation is a downer cos typeorm has everything I need but this. Please help! I need pointers or suggestions
My question was based on the limitations listed for Ionic production builds where date types are seen as objects and eventually converted to object columns instead of date columns
@AchevezAim Thanks a bunch!
Looks like this should work. Date comparison is critical to the project I am working on and with your suggestion I can do just that. I'll get right on it. And thanks again!
@dave-ok Is that working for you? I also like to work on this ORM library and Ionic 4. But not started yet. So how's your experience with this ORM and of course Date manipulation?
Activity
AchevezAim commentedon Jul 15, 2019
Is handling date as unix time an option?
dave-ok commentedon Jul 15, 2019
Pls I dont understand. Can you elaborate?
My question was based on the limitations listed for Ionic production builds where date types are seen as objects and eventually converted to object columns instead of date columns
#3 (comment)
AchevezAim commentedon Jul 15, 2019
Well, I handle dates as unix time (milliseconds since epoch).
Let's say you have:
When you fetch it, you will get date as number type, you can then use
new Date(date*1000)Or you can make a getter that returns a date object:
It's just a suggestion
dave-ok commentedon Jul 16, 2019
@AchevezAim Thanks a bunch!
Looks like this should work. Date comparison is critical to the project I am working on and with your suggestion I can do just that. I'll get right on it. And thanks again!
Sampath-Lokuge commentedon Feb 2, 2020
@dave-ok Is that working for you? I also like to work on this ORM library and Ionic 4. But not started yet. So how's your experience with this ORM and of course Date manipulation?