Skip to content

Instantly share code, notes, and snippets.

// ViewController.m
// AVPlayerCaching
// Created by Anurag Mishra on 5/19/14.
// Sample code to demonstrate how to cache a remote audio file while streaming it with AVPlayer
#import "ViewController.h"
#import <AVFoundation/AVFoundation.h>
cdesch / gist:2033820
Created March 14, 2012 03:31
Simple NSDate Components - Easy to break into pieces
NSDate *currDate = [NSDate date]; //Current Date
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"dd"];
NSString* myDayString = [NSString stringWithFormat:@"%@", [df stringFromDate:currDate]];
[df setDateFormat:@"MM"]; //MM will give you numeric "03", MMM will give you "Mar"
NSString* myMonthString = [NSString stringWithFormat:@"%@", [df stringFromDate:currDate]];