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
Hari raya nyepi |
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
var dateObj = new Date(); | |
var month = ('0' + (dateObj.getMonth() + 1)).slice(-2); | |
var date = ('0' + dateObj.getDate()).slice(-2); | |
var year = dateObj.getFullYear(); | |
var shortDate = year + '' + month + '' + date; | |
// Replace ./data.json with your JSON feed | |
fetch('https://raw.githubusercontent.com/guangrei/Json-Indonesia-holidays/master/calendar.json') | |
.then(response => response.json()) | |
.then(data => { |
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
<!-- Button Primary --> | |
<button className="btn btn-hg">Primary</button> | |
<!-- Button Secondary --> | |
<button className="btn btn-gray">Secondary</button> |
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
<?php | |
if (!function_exists('array_group_by')) { | |
/** | |
* Groups an array by a given key. | |
* | |
* Groups an array into arrays by a given key, or set of keys, shared between all array members. | |
* | |
* Based on {@author Jake Zatecky}'s {@link https://github.com/jakezatecky/array_group_by array_group_by()} function. | |
* This variant allows $key to be closures. |
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
// ini diletakan di HELPER atau langsung di controllernya | |
public static function keIndonesia($tgl) { | |
$dt = new \Carbon\Carbon($tgl); | |
setlocale(LC_TIME, 'IND'); | |
return $dt->formatLocalized('%A, %e %B %Y'); // Senin, 3 September 2018 | |
} |
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
var els = document.getElementsByClassName('current-class-name'); | |
removeClass(els, 'current-class-name'); | |
addClass(els, 'new-class-name'); | |
var el = document.getElementById('current-class-name'); | |
removeClass([el], 'current-class-name'); | |
addClass([el], 'new-class-name'); | |
function addClass(elements, className) { | |
for (var i = 0; i < elements.length; i++) { |