Skip to content

daehee/ago

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ago

A "time ago in words" helper for Nim, ported from Rails time_ago_in_words.

Usage

block:
  let fromTime = now() - 45.minutes
  echo fromTime.ago # "about 1 hour ago"

block:
  let fromTime = now() - (31.days)
  echo fromTime.ago # "about 1 month ago"

block:
  let fromTime = now() - (2.years + 3.months)
  echo fromTime.ago # "over 2 years ago"

About

"time ago in words" helper in Nim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages