Posts filed under 'Cocoa'

Cocoa Date Formats

I’m posting this here mostly for quick personal reference. Below is the date format strings used by NSCalendarDate this information was taken from here.

Conversion Specifier

Description

%%

a ‘%’ character

%a

abbreviated weekday name

%A

full weekday name

%b

abbreviated month name

%B

full month name

%c

shorthand for %X %x, the locale format for date and time

%d

day of the month as a decimal number (01-31)

%e

same as %d but does not print the leading 0 for days 1 through 9

%F

milliseconds as a decimal number (000-999)

%H

hour based on a 24-hour clock as a decimal number (00-23)

%I

hour based on a 12-hour clock as a decimal number (01-12)

%j

day of the year as a decimal number (001-366)

%m

month as a decimal number (01-12)

%M

minute as a decimal number (00-59)

%p

AM/PM designation for the locale

%S

second as a decimal number (00-59)

%w

weekday as a decimal number (0-6), where Sunday is 0

%x

date using the date representation for the locale

%X

time using the time representation for the locale

%y

year without century (00-99)

%Y

year with century (such as 1990)

%Z

time zone name (such as Pacific Daylight Time)

%z

time zone offset in hours and minutes from GMT (HHMM)

Add comment January 1st, 2009

OOP in Cocoa versus .NET

Cocoa is My Girlfriend has a good article discussing some of the differenences between the way .NET encourages you to write code and the way MVC is encouraged in Cocoa. The article really speaks to the truth in that Visual Studio really encourages you to go slap your business logic write in with your UI logic. There are definitely .NET communities that encourage a better look at design (specifically the ALT.NET guys), but the developer base as a whole doesn’t think about it too much.

Add comment August 29th, 2008


Calendar

January 2009
M T W T F S S
« Dec    
 1234
567891011
12131415161718
19202122232425
262728293031  

Posts by Month

Posts by Category