Skip to content

Instantly share code, notes, and snippets.

info face="Arial-BoldMT" size=37 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=2,2
common lineHeight=42 base=35 scaleW=128 scaleH=64 pages=1 packed=0
page id=0 file="bitmap-font-sample-1.png"
chars count=11
char id=32 x=103 y=33 width=0 height=0 xoffset=0 yoffset=34 xadvance=10 page=0 chnl=0 letter="space"
char id=48 x=86 y=2 width=19 height=29 xoffset=2 yoffset=5 xadvance=21 page=0 chnl=0 letter="0"
char id=49 x=88 y=33 width=13 height=28 xoffset=3 yoffset=6 xadvance=21 page=0 chnl=0 letter="1"
char id=50 x=46 y=33 width=19 height=28 xoffset=1 yoffset=6 xadvance=21 page=0 chnl=0 letter="2"
char id=51 x=23 y=2 width=19 height=29 xoffset=1 yoffset=5 xadvance=21 page=0 chnl=0 letter="3"
char id=52 x=2 y=33 width=21 height=28 xoffset=1 yoffset=6 xadvance=21 page=0 chnl=0 letter="4"
NSDateComponents *fromComponents = [[NSCalendar currentCalendar] components:NSCalendarUnitDay | NSCalendarUnitMonth | NSCalendarUnitYear fromDate:[_fromDate dateValue]];
NSDateComponents *toComponents = [[NSCalendar currentCalendar] components:NSCalendarUnitDay | NSCalendarUnitMonth | NSCalendarUnitYear fromDate:[_toDate dateValue]];
NSString *fromDateString = [NSString stringWithFormat:@"%li-%li-%li 00:00:00", fromComponents.day, fromComponents.month, (long)fromComponents.year];
NSString *toDateString = [NSString stringWithFormat:@"%li-%li-%li 23:59:59", toComponents.day, toComponents.month, (long)toComponents.year];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
// this is imporant - we set our input date format to match our input string
// if format doesn't match you'll get nil from your string, so be careful
[dateFormatter setDateFormat:@"dd-MM-yyyy HH:mm:ss"];
@Tpbradley
Tpbradley / gist:1689a072f7fa54755431
Last active August 29, 2015 14:19
Testing Swift Gist
import Cocoa
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
var test = "123"
}