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
RB.filter('daterange', function () | |
{ | |
return function(conversations, start_date, end_date) | |
{ | |
var result = []; | |
// date filters | |
var start_date = (start_date && !isNaN(Date.parse(start_date))) ? Date.parse(start_date) : 0; | |
var end_date = (end_date && !isNaN(Date.parse(end_date))) ? Date.parse(end_date) : new Date().getTime(); |
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
+ (NSArray*)allEntriesInContext:(NSManagedObjectContext*)context fromDate:(NSDate*)fromDate toDate:(NSDate*)toDate{ | |
// Create the request | |
NSFetchRequest *request = [[NSFetchRequest alloc]initWithEntityName:@"Entry"]; | |
// Build the predicate | |
NSPredicate *predicate = [NSPredicate predicateWithFormat: @"date >= %@ && date <= %@ ", fromDate, toDate]; | |
request.predicate = predicate; | |
// Define sorting | |
NSSortDescriptor *sortDesc = [NSSortDescriptor sortDescriptorWithKey:@"date" ascending:YES]; | |
request.sortDescriptors = @[sortDesc]; |
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
// adding xcode project to github | |
// create git repo on github | |
// go to directory with .xcodeproj file | |
git init | |
git add . | |
git commit -m 'initial commit' | |
git remote add origin git@github.com:tonyalbor/REPOSITORY.git | |
git pull origin master | |
git push origin master |