Closed Bug 1366955 Opened 7 years ago Closed 4 years ago

The date and time is displayed as NaN and undefined


(Firefox for Android Graveyard :: General, defect, P5)

53 Branch


(Not tracked)



(Reporter: lgbrowser5, Unassigned)


(Blocks 1 open bug, )



(2 files)

Attached image Screenshot_Firefox.png
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3; NetHelper70; CNS_UA; GWX:MANAGED; AD_LOGON=4C47452E4E4554; rv:11.0) like Gecko

Steps to reproduce:

Steps to reproduce:

1. Platform Version (M): NOS(7.0)
2. Firefox version (M): Firefox 53.0.2, Firefox Beta 54.0
3. Reproducible on LG Ref. device (M) : Yes / G5 device
4. Reproduce rate (M) : 100%
5. Issue Reported (M) : Internal
6. Issue Description (Wrong behavior) (M) : The date and time is displayed as NaN and undefined
7. Expected behavior (M) : The date and time should be displayed normally
8. Steps to reproduce (M) : 
Firefox > 
9. Screen Capture (M) : Yes
10. MORE INFORMATION (O): Chrome works normally
It's reproducible on PC Mozilla Firefox.

When it fixed, please share Engineering Report or Release info. for patches. 

Actual results:

The date and time is displayed as undfined

Expected results:

The date and time should be displayed normally
Attached image Screenshot_Chrome.png
Summary: undefined type NaN → The date and time is displayed as NaN and undefined
I bet this will be a website bug, but it's an interesting one.
Ever confirmed: true
Flags: needinfo?(miket)
The Javascript in question is in a template called "commentListTemplate"

          '<span class="bc_time"><b class="u_skip">작성시간</b><em class="bc_time_txt">{js sports.ccmt.dateFormat(=comment.modTime)}</em></span>',

and it's in the file
I think this is some kind of date parsing compat issue. That template calls a dateFormat method on the modTime prop of a comment, and returns a string. 

Here's a sample datetime string:


And that returns a buncha NaNs:

"NaN.'{mm}:undefined type'.0NaN 오후 0NaN:0NaN"

dateFormat is defined as:

function(e) {
  var t = e.split(/[-T.]/),
    n = new Date(t.slice(0, 3).join("/") + " " + t[3]),
    r = {
      format: "{yyyy}.{mm}.{0d} {ap} {0h}:{0i}",
      ampmFormat: ["오전", "오후"]
  return changeDateFormat(n, r)

I'm guessing new Date(foo) is returning NaN here. Will need to dig in and find out why... This may be Bug 1274354 territory.
The date that comes out after the split/slice is:

2017/05/30 17:21:59+0900

And sure enough, new Date() doesn't like this. Works fine on Chrome.

Tue May 30 2017 03:21:59 GMT-0500 (CDT)

I think your bug 1274354 assessment is correct.
Blocks: 1274354
Flags: needinfo?(miket)
Re-triaging per

Needinfo :susheel if you think this bug should be re-triaged.
Priority: -- → P5
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly]( an issue can be reported at the [Fenix GitHub project]( If you want to discuss your report please use [Mozilla's chat]( server and join the [#fenix]( channel.
Closed: 4 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.