logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SerenityHubRelativeTimeFormatter

    Formats a UTC timestamp as a short human-readable relative string ("just now", "5 min ago", "2 h ago", "3 d ago") for report-card and metric-card "last run" displays. Pure and side-effect free so it can be unit tested without a validation cache or a running editor.

    Inheritance
    object
    SerenityHubRelativeTimeFormatter
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Localization.Installation.Settings.Editor.Hub.Components
    Assembly: Serenity.UnityLocalization.Installation.Editor.dll
    Syntax
    public static class SerenityHubRelativeTimeFormatter

    Methods

    Format(DateTime, DateTime)

    Declaration
    public static string Format(DateTime timestampUtc, DateTime nowUtc)
    Parameters
    Type Name Description
    DateTime timestampUtc
    DateTime nowUtc
    Returns
    Type Description
    string
    In this article
    © 2026 Serenity. All Rights Reserved