-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
Store dates as ISO-8601 formatted strings #228
Conversation
2 similar comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks excellent.
? Dynamoid.config.store_date_as_string \ | ||
: options[:store_as_string] | ||
|
||
unless use_string_format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you write it this way to optimize for fact that it'll likely be false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@richardhsu Yep. I consider numeric format as a common case and string one as an exception.
Similar to #223
store_as_string
field option fordate
fieldsdatetime
optionstore_as_native_string
tostore_as_string
store_datetime_as_string
andstore_date_as_string