problem with date object
empty2nbsp function in template