aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/attribute_test.rb
diff options
context:
space:
mode:
authorArnau Siches, Andrey Novikov <envek@envek.name>2014-09-14 17:16:51 +0400
committerJeremy Daer <jeremydaer@gmail.com>2016-04-18 16:27:30 -0700
commit04c512da1247a54474cfd8bef17a9e9019c34004 (patch)
tree995e1bae1ce60a217da23b3ff52f7da5e290556a /activerecord/test/cases/attribute_test.rb
parentfe685c62929fd3c67df041f1ccb0def2ff051f35 (diff)
downloadrails-04c512da1247a54474cfd8bef17a9e9019c34004.tar.gz
rails-04c512da1247a54474cfd8bef17a9e9019c34004.tar.bz2
rails-04c512da1247a54474cfd8bef17a9e9019c34004.zip
`ActiveSupport::Duration` supports ISO8601 formatting and parsing.
```ruby ActiveSupport::Duration.parse('P3Y6M4DT12H30M5S') (3.years + 3.days).iso8601 ``` Inspired by Arnau Siches' [ISO8601 gem](https://github.com/arnau/ISO8601/) and rewritten by Andrey Novikov with suggestions from Andrew White. Test data from the ISO8601 gem redistributed under MIT license. (Will be used to support the PostgreSQL interval data type.)
Diffstat (limited to 'activerecord/test/cases/attribute_test.rb')
0 files changed, 0 insertions, 0 deletions