Skip to content

Cannot get format=relative to display seconds #269

@bear24rw

Description

@bear24rw

I cannot get relative format to display second level precision. The docs suggest that the default precision is seconds and this table suggests that with format relative i should see seconds. But I only see now until 1 minute has passed. format=elapsed works as i expect.

image
<html>
  <body>
    <p>Loaded this page <relative-time datetime="" format="relative" id="dynamic1"></relative-time></p>
    <p>You've been on this page for <relative-time datetime="" format="duration" id="dynamic2"></relative-time></p>
    <script type="module" src="https://unpkg.com/@github/relative-time-element@latest/dist/bundle.js"></script>
    <script>
    document.getElementById('dynamic1').date = new Date()
    document.getElementById('dynamic2').date = new Date()
    </script>
  </body>
</html>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions