diff options
author | Parker Selbert <parker@sorentwo.com> | 2013-07-16 16:16:33 -0400 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2014-01-26 21:25:54 +0000 |
commit | 4cfc467594da86090efa63f1852fb82df9458c2b (patch) | |
tree | dbc771cf9747b324fe5614b569ff687d745de810 /activesupport/lib/active_support/multibyte/unicode.rb | |
parent | e1e17a55d246d485f546766606580e8e4919442b (diff) | |
download | rails-4cfc467594da86090efa63f1852fb82df9458c2b.tar.gz rails-4cfc467594da86090efa63f1852fb82df9458c2b.tar.bz2 rails-4cfc467594da86090efa63f1852fb82df9458c2b.zip |
Customize subsecond digits when encoding DateWithTime
The subsecond fraction digits had been hardcoded to 3. This forced all
timestamps to include the subsecond digits with no way to customize the
value. While the subsecond format is part of the ISO8601 spec, it is not
adhered to by all parsers (notably mobile clients). This adds the
ability to customize the number of digits used, optionally setting them
to 0 in order to eliminate the subsecond fraction entirely:
ActiveSupport::JSON::Encoding.subsecond_fraction_digits = 0
Diffstat (limited to 'activesupport/lib/active_support/multibyte/unicode.rb')
0 files changed, 0 insertions, 0 deletions