Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

twitter JSON date (created_at) passed as a string doesn't recognize time zone #4

@jasonreposa

Description

@jasonreposa

If you take some JSON from twitter and pass the created_at property as a string to humaneDate, it will fail to adjust to your time zone.

However, if you pass it a date object it will work.

E.g.,

created_at: "Fri Jan 27 18:40:26 +0000 2012"

Fails: humaneDate("Fri Jan 27 18:40:26 +0000 2012") -> 6 Hours Ago

Pass: humaneDate(new Date("Fri Jan 27 18:40:26 +0000 2012") -> 1 Minute Ago

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions