Skip to content
This repository was archived by the owner on Feb 20, 2021. It is now read-only.

ReinisV/daysDiffDirective

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Archivation note [START]

I wrote the stuff in this repository so long ago, I barely remember doing it.

Since angularjs is dead, I don't plan on adding anything to it.

Archivation note [END]

daysDiffDirective

an angular directive, which displays (as a string) the difference between any two javascript Date objects, or one Date object and this moment.

This is just a quick directive I wrote. It is far from perfect and comes as-is. Use it as you see fit. (within the constraints of MIT license).

If you found a bug, or thought of something interesting to add, use the Issues tab or create a Pull request.

demo plnkr here

TODO:

[bug] if dd-translation object gets instantiated and then set to null, days-diff does not reset translation values to defaults, but keeps it's previous value

[feature] make diff-days take into account the calendar when calculating diff. Right now it assumes that a day is 24 x hour, a week is 7 x day, a month is 4 x week, and year is 12 x month, this does not take into account stuff like daylight savings and different lengths of month.

[feature] maybe implement the usage of ng-pluralize?

About

an angular directive, which displays (as a string) the difference between any two javascript Date objects, or one Date object and this moment.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors