more functionality for ListCalendar
This commit is contained in:
parent
96d03fc386
commit
d2972cd526
5 changed files with 61 additions and 53 deletions
|
|
@ -279,6 +279,7 @@ Ox.formatDateRange <f> Formats a date range as a string
|
|||
'Sun, Jan 1, 50 BC, 00:00:00 - 23:59:59'
|
||||
@*/
|
||||
Ox.formatDateRange = function(start, end, utc) {
|
||||
end = end || Ox.formatDate(new Date(), '%Y-%m-%d');
|
||||
var isOneUnit = false,
|
||||
range = [start, end],
|
||||
strings,
|
||||
|
|
@ -370,6 +371,7 @@ Ox.formatDateRangeDuration <f> Formats the duration of a date range as a string
|
|||
'1 month'
|
||||
@*/
|
||||
Ox.formatDateRangeDuration = function(start, end, utc) {
|
||||
end = end || Ox.formatDate(new Date(), '%Y-%m-%d');
|
||||
var date = Ox.parseDate(start, utc),
|
||||
dates = [start, end].map(function(str) {
|
||||
return Ox.parseDate(str, utc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue