tastypie
Version:
Tastypie is a webservice API framework for Node.js based on Django's Tastypie Framework. It provides a convenient, yet powerful and highly customizable, abstraction for creating REST-style interfaces
17 lines (13 loc) • 354 B
JavaScript
define(['./startOf'], function (startOf) {
/**
* Check if date is "same" with optional period
*/
function isSame(date1, date2, period){
if (period) {
date1 = startOf(date1, period);
date2 = startOf(date2, period);
}
return Number(date1) === Number(date2);
}
return isSame;
});