0
我從日期得到非常奇怪的數據,我只是不明白爲什麼?!?角度不轉換unix日期,因爲它應該
<b>{{ (lines.date*1000) | date:"dd-mm-yyyy" }}: </b>
這裏是我的線陣列中的數據:
"lines" : [
{
"text" : "was CREATED Tue Jul 11 2017 from Booking.com: ThaiHome by ThaiHome Staff",
"date" : 1499754031
},
{
"date" : 1499754031,
"text" : "wrote message: This is the message the NEW user writes to manager"
},
{
"date" : 1499754140,
"text" : "wrote message: This is the message the NEW user writes to manager"
},
{
"date" : 1499754140,
"text" : "wrote message: This is the message the NEW user writes to manager"
},
這裏是輸出
11-20-2017: was CREATED Tue Jul 11 2017 from Booking.com: ThaiHome by ThaiHome Staff
11-20-2017: wrote message: This is the message the NEW user writes to manager
11-22-2017: wrote message: This is the message the NEW user writes to manager
11-22-2017: wrote message: This is the message the NEW user writes to manager
11-22-2017: wrote message: This is the message the NEW user writes to manager
11-24-2017: wrote message: This is the message the NEW user writes to manager
11-24-2017: wrote message: This is the message the NEW user writes to manager
11-24-2017: wrote message: This is the message the NEW user writes to manager
爲什麼會出現這些奇怪的日期,而不是越來越平常實際日期?
Noooo真的嗎?哈哈哈該死! - 我一直在爲這個問題出汗一個小時,試圖用數學哈哈解決它。我需要更好地看看它接受的令牌:-)感謝Prerak :-D – torbenrudgaard
樂意幫忙:) –
https://docs.angularjs.org/api/ng/filter/date - 它們都是:-D – torbenrudgaard