Update changelog and README

This commit is contained in:
Jesse Gumm 2014-08-22 23:57:23 -05:00
parent 5cb5612857
commit daa04395f2
3 changed files with 26 additions and 1 deletions

View file

@ -1,3 +1,7 @@
## 0.4.0
* Add basic date arithmetic
## 0.3.0 ## 0.3.0
* Add Timezone/Daylight Saving Disambiguation * Add Timezone/Daylight Saving Disambiguation

View file

@ -614,6 +614,27 @@ ok
%% that timezone to our intended timezone. %% that timezone to our intended timezone.
``` ```
## Date Arithmetic
The current implementation of qdate's date arithmetic returns Unixtimes.
There are 8 functions for date arithmetic:
+ `add_seconds(Seconds, Date)`
+ `add_minutes(Minutes, Date)`
+ `add_hours(Hours, Date)`
+ `add_days(Days, Date)`
+ `add_weeks(Weeks, Date)`
+ `add_months(Months, Date)`
+ `add_years(Years, Date)`
+ `add_date(DateToAdd, Date)` - `DateToAdd` is a shortcut way of adding
numerous options. For example. `qdate:add_date({{1, 2, -3}, {-500, 20, 0}})`
will add 1 year, add 2 months, subtract 3 days, subtract 500 hours, add 20
minutes, and not make any changes to seconds.
For the date arithmetic functions, `Date`, like all qdate functions, can be any
format.
## Thanks ## Thanks
A few shoutouts to [Dale Harvey](http://github.com/daleharvey) and the A few shoutouts to [Dale Harvey](http://github.com/daleharvey) and the

View file

@ -1,7 +1,7 @@
{application, qdate, {application, qdate,
[ [
{description, "Simple Date and Timezone handling for Erlang"}, {description, "Simple Date and Timezone handling for Erlang"},
{vsn, "0.3.0-pre"}, {vsn, "0.4.0-pre"},
{registered, []}, {registered, []},
{applications, [ {applications, [
kernel, kernel,