mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 16:28:38 +09:00
Bug 1310078 - Implement valueAsNumber and valueAsDate for <input type=datetime-local>
This commit is contained in:
parent
5381ebe25c
commit
344ea39e20
6 changed files with 351 additions and 26 deletions
|
|
@ -354,9 +354,21 @@ MakeDate(double day, double time)
|
|||
JS_PUBLIC_API(double)
|
||||
JS::MakeDate(double year, unsigned month, unsigned day)
|
||||
{
|
||||
MOZ_ASSERT(month <= 11);
|
||||
MOZ_ASSERT(day >= 1 && day <= 31);
|
||||
|
||||
return ::MakeDate(MakeDay(year, month, day), 0);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(double)
|
||||
JS::MakeDate(double year, unsigned month, unsigned day, double time)
|
||||
{
|
||||
MOZ_ASSERT(month <= 11);
|
||||
MOZ_ASSERT(day >= 1 && day <= 31);
|
||||
|
||||
return ::MakeDate(MakeDay(year, month, day), time);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(double)
|
||||
JS::YearFromTime(double time)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue