[FIX] fixed dates.js

bzr revid: fme@openerp.com-20110512143835-16l5c3ajj36l4nrn
This commit is contained in:
Fabien Meghazi 2011-05-12 16:38:35 +02:00
parent 50194d321e
commit 6b09377f4f
1 changed files with 4 additions and 4 deletions

View File

@ -96,7 +96,7 @@ var fts = function(str, size) {
* @returns {String} A string representing a datetime.
*/
openerp.base.format_datetime = function(obj) {
if(! str) {
if (!obj) {
return false;
}
return fts(obj.getUTCFullYear(),4) + "-" + fts(obj.getUTCMonth() + 1,2) + "-"
@ -112,7 +112,7 @@ openerp.base.format_datetime = function(obj) {
* @returns {String} A string representing a date.
*/
openerp.base.format_date = function(obj) {
if(! str) {
if (!obj) {
return false;
}
return fts(obj.getFullYear(),4) + "-" + fts(obj.getMonth() + 1,2) + "-"
@ -127,11 +127,11 @@ openerp.base.format_date = function(obj) {
* @returns {String} A string representing a time.
*/
openerp.base.format_time = function(obj) {
if(! str) {
if (!obj) {
return false;
}
return fts(obj.getHours(),2) + ":" + fts(obj.getMinutes(),2) + ":"
+ fts(obj.getSeconds(),2);
};
};
};