Skip to content

abayaz61/TimeSpanJs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

TimeSpanJs

JavasScript TimeSpan clone by .Net

This framework like .Net TimeSpan class but exist many little differents.

Support ECMAScript 6

Sample usage:

Create timeSpan from days.

var timeSpan =TimeSpan.fromDays(10);

Create timeSpan from hours.

var timeSpan =TimeSpan.fromHours(10);

Create timeSpan from minute.

var timeSpan =TimeSpan.fromMinutes(10);

Create timeSpan from seconds.

var timeSpan =TimeSpan.fromSeconds(10);

Create timeSpan from milliseconds.

var timeSpan =TimeSpan.fromMilliseconds(10);

Create timeSpan from time.

var timeSpan =TimeSpan.fromTime(/hour/1,/minute/15,/second/30);

Create timeSpan from datetime.

var timeSpan =TimeSpan.fromDateTime(/days/2,/hour/1,/minute/15,/second/30);

Create timeSpan from two date diff.

var timeSpan =TimeSpan.fromDiff(date1,date2);