fish-helper v0.0.38
npm install fish-helper
const helper = require('fish-helper')
Methods
add(hour, start) ------- add Hour from start date, return timestamp
offset_time(date, type) ------- The time difference (absolute value), returns the corresponding string as the second argument, such as 01,22....
before_lt_hour(date, hour) ------- The date is less than now, and the date is less than hour from now
before_gt_hour(date, hour) ------- The date is less than now, and the date is greater than hour from now
after_lt_hour(date, hour) ------- The date is greater than now, and the date is less than hour from now
after_gt_hour(date, hour) ------- The date is greater than now, and the date is greater than hour from now
is_current_year(date) ------- return Boolean
get_time_obj(date) ------- return Object that include keys: year、month、day、hour、minute、seconds、day_of_week
format_count({num, divide, suffix, show_suffix_always}) ------- return num or String or 0
format_num2date(timestamp) ------- convert time to Object; return Object that include keys: day、hour、minute、seconds
count_down(date, fn) ------- End time countdown, end time can be passed in by itself; fn is a callback function that takes a remaining time argument; return a function to stop the timer
count_down_by_remain_seconds(fn, seconds) ------- 60-second countdown. Time can pass by itself
format_thousandth(num) ------- format the data as a string with thousands of bits
is_empty(data) ------- determines whether the data is empty
poll(fn, minute) ------- Execute fn function every minute, return funtion to stop the fn
- is_equal(a, b) ------- return boolean, compare a and b; a and b are any type of data
3 days ago
23 days ago
23 days ago
23 days ago
23 days ago
24 days ago
24 days ago
24 days ago
24 days ago
24 days ago
24 days ago
24 days ago
24 days ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago