Skip to content

toriphes/it.toriphes.timeago

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alloy Time Ago widget Alloy

This widget allows you to determine and display the "ago" time.

Features

  • Calculate the "ago" time
  • Localization support

Quick Start

Download this repository and consult the Alloy Documentation on how to install it, or simply use the gitTio CLI:

$ gittio install it.toriphes.timeago

Use it

  • In alloy add the widget to your View

     <Alloy>
         <Window class="container">
             <Widget id="ta" src="it.toriphes.timeago" date="2012-10-08" />
         </Window>
     </Alloy>
  • or in the controller

     var ta = Alloy.createWidget("it.toriphes.timeago");
     ta.inWords("2012-10-08");

Localize

Localization file are in $project_root/app/widgets/it.toriphes.timeago/i18n

If a localization is not present within the widget you can write it and send a pull request or implement the translated strings in your localization file

Options

All the options are passed to the label object. Special option

Parameter Type Default
date string|object|array|Date|Moment undefined

Methods

Function Parameters Usage
inWords string|object|array|Date|Moment Returns the timeago string

About

Widget to determine and display the "ago" time.

Resources

Stars

Watchers

Forks

Packages

No packages published