Class: Daystill

Daystill(Date, Month, Year)

new Daystill(Date, Month, Year)

Day till Class is used to calculate the number of Days remain till the given date. Given the Date you want to check in the Constructor of this Class and this class Have few more method like isToday(),isYesterday()etc.. And we keep adding new Functions to this Class... No dependencies (*-*)
Parameters:
Name Type Description
Date Number Date you want to calculate Days
Month Number Month you want to calculate Days
Year Number Year for Calculate Days
Author:
  • Lakshmanshankar
Source:

Methods

CountDays() → {number}

CountDays will return number of days till the date given in the constructor Base function for CountHours() and CountMinutes()
Source:
Returns:
Return Number of Days till given date
Type
number

CountHours() → {number}

CountHours will return number of Hours till the date given in the constructor
Source:
Returns:
return number of Hours till a given time
Type
number

CountMinutes() → {number}

CountMinutes will return number of Minutes till the date given in the constructor
Source:
Returns:
return number of Minutes till a given time
Type
number

HoursRemaingToday() → {Number}

return Number Of Hours Remaining Today
Source:
Returns:
Number Of Hours Remaining Today
Type
Number

isToday(date) → {Boolean}

Function is used to check that the given date is Today or Not
Parameters:
Name Type Description
date Number Date you want to check is Today
Source:
Returns:
true if the date given is Today
Type
Boolean

isTomorrow(date) → {Boolean}

Function is used to check that the given date is Tomorrow or Not
Parameters:
Name Type Description
date Number Date you want to check is Tomorrow
Source:
Returns:
true if the date given is tomorrow
Type
Boolean

isValidInfo() → {Boolean}

isValidInfo() will check the values given in the constructor is valid or not Days till will calculate Only for the future
Source:
Returns:
true if Given information is valid else false
Type
Boolean

isYesterday(date) → {Boolean}

Function is used to check that the given date is Yesterday or Not
Parameters:
Name Type Description
date Number Date you want to check is Yesterday
Source:
Returns:
true if the date given is Yesterday
Type
Boolean

Remainder(Mins)

Async functions used for Remainders
Parameters:
Name Type Description
Mins String if Timer Reaches A given time it returns A STIRNG("Time Reached")
Source:

Today() → {String}

A string containg current Day of the week
Source:
Returns:
returns Day of week
Type
String

Tomorrow() → {String}

A string containg DayAfter the current Day of the week
Source:
Returns:
returns DayAfter today
Type
String

whichDate(Day, IndexOfDay, Month, Year)

This will return the Actual Date using the params Given
Parameters:
Name Type Description
Day String Day of the Week
IndexOfDay Number Ex if you want to get 2nd monday of a month you have to give 2 here
Month Number Which Month you want to get the Date
Year Number Which year you want to get the Date
Source:

whichDay(date, month, year) → {String}

Calculate which day of the week is the Date given to this Command
Parameters:
Name Type Description
date Number Date you want to calculate Day
month Number Month you want to calculate Day
year Number Year you want to calculate Day
Source:
Returns:
Day of the Week
Type
String