MCPcopy Index your code
hub / github.com/hoothin/UserScripts / isRushTime

Function isRushTime

T66y tool/T66y tool.user.js:243–260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

241 }, 2000);
242 }
243 function isRushTime() {
244 var date = new Date();
245 var year = date.getFullYear();
246 var month = date.getMonth()+1;
247 var today = date.getDate();
248 var hour = date.getHours();
249 if (hour < 20) return false;
250
251 var newYear = year;
252 var newMonth = month++;
253 if (month > 12) {
254 newMonth = 1;
255 newYear++;
256 }
257 var newDate = new Date(newYear, newMonth, 1);
258 var monthLast2Day = (new Date(newDate.getTime() - 2 * 1000 * 60 * 60 * 24)).getDate();
259 return (today == monthLast2Day);
260 }
261 function submitReply() {
262 $.ajax({
263 type: form.attr('method'),

Callers 1

t66yFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected