oops, forgot to commit that important change
This commit is contained in:
parent
6f65dde25f
commit
c757788c0b
@ -210,11 +210,7 @@ class LiteralDatetimeVar(LiteralVar, DateTimeVar):
|
|||||||
Returns:
|
Returns:
|
||||||
LiteralDatetimeVar: The new instance of the class.
|
LiteralDatetimeVar: The new instance of the class.
|
||||||
"""
|
"""
|
||||||
if isinstance(value, datetime):
|
js_expr = f'"{str(value)}"'
|
||||||
js_expr = f"'{value.year}-{value.month - 1}-{value.day} {value.hour}:{value.minute}:{value.second}, {value.microsecond})"
|
|
||||||
js_expr = f'"{str(value)}"'
|
|
||||||
elif isinstance(value, date):
|
|
||||||
js_expr = f"new Date({value.year}, {value.month - 1}, {value.day})"
|
|
||||||
return cls(
|
return cls(
|
||||||
_js_expr=js_expr,
|
_js_expr=js_expr,
|
||||||
_var_type=type(value),
|
_var_type=type(value),
|
||||||
|
Loading…
Reference in New Issue
Block a user