Skip to content

Upgrade function since($stamp) to consider weeks, months, years #2008

Description

@kuopassa

Is your feature request related to a problem?

Inside textpattern/lib/txplib_misc.php is the function since($stamp) which seems to present the since-format for certain timestamps. It doesn't seem to consider cases where several weeks, months or even years have passed.

What is the feature?

Include weeks, months and years in the function. Simple examples:

  • If timestamp is older than 7 days, show "1 week"
  • If timestamp is older than 31 days, show "1 month"
  • If timestamp is older than 366 days, show "1 year"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions