0

I am getting very strange data from the dates, and I just cannot see why?!?

<b>{{ (lines.date*1000) | date:"dd-mm-yyyy" }}: </b>

Here is the data in my lines array:

   "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"
        }, 

And here is the output

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

Why am I getting these strange dates instead of getting the usual real dates?

1 Answer 1

3

Small mm is for minute in hour, padded (00-59). For month you can use one of the below:

  • MMMM: Month in year (January-December)
  • MMM: Month in year (Jan-Dec)
  • MM: Month in year, padded (01-12)
  • M: Month in year (1-12)

Official reference

Sign up to request clarification or add additional context in comments.

2 Comments

Noooo really?? hahaha damn! - I been sweating over this one for an hour trying to solve it with math hahah. I need to look better at the tokens it accepts :-) Thanks Prerak :-D
Happy to help :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.