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
package main | |
import ( | |
"fmt" | |
"image/color" | |
"image/png" | |
"os" | |
"path/filepath" | |
"strings" | |
) |
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
func RemoveAccents(s string) string { | |
rep := strings.NewReplacer( | |
"Š", "S", | |
"š", "s", | |
"Đ", "Dj", | |
"đ", "dj", | |
"Ž", "Z", | |
"ž", "z", | |
"Č", "C", | |
"č", "c", |
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
package main | |
import ( | |
"errors" | |
"fmt" | |
"reflect" | |
) | |
func main() { |
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
/** | |
* Return a array of weeks in a month, with start and end date or day. | |
* @param _month number Define the month (WARNING: month start at 0 in javascript) | |
* @param _year number Define the year | |
* @param returnDate boolean Define if returns a Date class in returned array or not | |
* @return Array<{start: number, end: number}> | |
*/ | |
public getWeeksStartAndEndInMonth(_month: number, _year: number, returnDate: boolean = false) { | |
const lastDay = new Date(_year, _month + 1, 0); | |
let weeks: Array<{start: number, end: number}> = []; |