Skip to content

Instantly share code, notes, and snippets.

jrran90

Block or report user

Report or block jrran90

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@6174
6174 / Random-string
Created Jul 23, 2013
Generate a random string in JavaScript In a short and fast way!
View Random-string
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
@markthiessen
markthiessen / GetWeeksInMonth.js
Created Oct 13, 2012
JavaScript - get weeks in a month as array of start and end days
View GetWeeksInMonth.js
//note: month is 0 based, just like Dates in js
function getWeeksInMonth(month, year){
var weeks=[],
firstDate=new Date(year, month, 1),
lastDate=new Date(year, month+1, 0),
numDays= lastDate.getDate();
var start=1;
var end=7-firstDate.getDay();
while(start<=numDays){
You can’t perform that action at this time.