Updated date handler and javascript generator.