4097d29b34640f92dc41a9da8446f36a1aca9c48
[platform/framework/web/crosswalk-tizen.git] /
1 var startOf = require('./startOf');
2
3     /**
4      * Check if date is "same" with optional period
5      */
6     function isSame(date1, date2, period){
7         if (period) {
8             date1 = startOf(date1, period);
9             date2 = startOf(date2, period);
10         }
11         return Number(date1) === Number(date2);
12     }
13
14     module.exports = isSame;
15
16