Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nice_relative_date #155

Open
JarbasAl opened this issue Nov 5, 2020 · 0 comments
Open

nice_relative_date #155

JarbasAl opened this issue Nov 5, 2020 · 0 comments
Labels
enhancement New feature or request multi_lang relates to several languages

Comments

@JarbasAl
Copy link
Collaborator

JarbasAl commented Nov 5, 2020

noticed this when looking into alarm skill, there is a TODO that belongs in this repo

https://github.com/MycroftAI/skill-alarm/blob/20.08/__init__.py#L1133

def nice_relative_time(when, relative_to=None, lang=None):
    """ Create a relative phrase to roughly describe a datetime
    Examples are "25 seconds", "tomorrow", "7 days".
    Args:
        when (datetime): Local timezone
        relative_to (datetime): Baseline for relative time, default is now()
        lang (str, optional): Defaults to "en-us".
    Returns:
        str: Relative description of the given time
    """
@JarbasAl JarbasAl added enhancement New feature or request multi_lang relates to several languages labels Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request multi_lang relates to several languages
Projects
None yet
Development

No branches or pull requests

1 participant