This file contains hidden or 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
const getURL = year => `https://nolaborables.com.ar/api/v2/feriados/${year}` | |
const months = ['Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre']; | |
const days = ['Domingo', 'Lunes', 'Martes', 'Miercoles', 'Jueves', 'Viernes', 'Sabado']; | |
const dayOfWeek = (day, month, year) => days[new Date(year, month, day).getDay()]; | |
const getYear = () => (new Date()).getFullYear(); | |
const getNextHoliday = function(holidays){ | |
const now = new Date() |
This file contains hidden or 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
resolveURL: function (route, params, appendRoot) { | |
var appendRoot = (appendRoot == false) ? false : true; | |
var route, params; | |
var href = ""; | |
var regExpAllNormalParams = /(\(\?)?\/:\w+/g; | |
var regExpAllOptionalParams = /\((.*?)\)/g; | |
href = router.routes[route]; |
This file contains hidden or 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
// All navigation that is relative should be passed through the navigate | |
// method, to be processed by the router. If the link has a `data-bypass` | |
// attribute, bypass the delegation completely. | |
$(document).on("click", "a[href]:not([data-bypass])", function (evt) { | |
// Get the absolute anchor href. | |
var href = { prop: $(this).prop("href"), attr: $(this).attr("href") }; | |
// Get the absolute root. | |
var root = location.protocol + "//" + location.host + app.root; | |
// Ensure the root is part of the anchor href, meaning it's relative. |