This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// v1.0.1 | |
// consts | |
const weekInMs = 1000 * 60 * 60 * 24 * 7; | |
const dayInMs = 1000 * 60 * 60 * 24; | |
// main function | |
const getWeekArray = (currentDate: Date, page: number) => { | |
if (page > 0) { | |
currentDate = new Date(currentDate.getTime() + weekInMs * page); // Add X weeks where X is page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x-swagger-router-controller: products_ctrl | |
get: | |
tags: | |
- Catalog | |
summary: Get products object | |
description: You can filter list by currency, category and language | |
operationId: searchProducts | |
parameters: | |
- name: lang_id | |
in: query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE phonebook ( | |
phone VARCHAR(20) NOT NULL, | |
fname VARCHAR(50) NOT NULL, | |
lname VARCHAR(50) NOT NULL, | |
email VARCHAR(100), | |
state VARCHAR(50) NOT NULL, | |
city VARCHAR(50), | |
age INT | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let pubAPI; //je nastavene v momente ked sa logne po FB, je to nastavene zasadne pred tym ako je vyvolane changeTitle() | |
let dbDays; //je nastavene pred changeTitle, precita hodnotu z DB.. | |
function changeTitle() { | |
if(pubAPI) { | |
let date1 = new Date(); | |
var date2 = new Date("2018-06-29 00:00:00"); | |
var timeDiff = Math.abs(date2.getTime() - date1.getTime()); |
NewerOlder