Skip to content
Discussion options

You must be logged in to vote

You can use helpers.relativeTime()

type: custom:button-card
variables:
  testDate: |
    [[[
      return "2025-08-23 13:12:00"
    ]]]
styles:
  grid:
    - grid-template-areas: "\"n\" \"l\""
name: Relative Time
show_label: true
label: |
  [[[ return helpers.relativeTime(variables.testDate) ]]]

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by dcapslock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #395 on August 20, 2025 03:35.