From 49c425a5fe783264f77ef6c4fcc2ad38a41ee543 Mon Sep 17 00:00:00 2001 From: "MPG13 (Micah Gomez)" Date: Sun, 6 May 2018 15:12:03 -0600 Subject: [PATCH] set day format to dd/MM --- Tweak.xm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Tweak.xm b/Tweak.xm index 4cf62f0..b0c7e2b 100644 --- a/Tweak.xm +++ b/Tweak.xm @@ -10,11 +10,12 @@ - (void)setText:(NSString *)text { if([text containsString:@":"]) { NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; - dateFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]; - dateFormatter.dateStyle = NSDateFormatterShortStyle; + // dateFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]; + [dateFormatter setDateFormat:@"dd/MM"]; + //dateFormatter.dateStyle = dd/MM/yyyy; NSDate *now = [NSDate date]; NSString *shortDate = [dateFormatter stringFromDate:now]; - shortDate = [shortDate substringToIndex:[shortDate length]-3]; + shortDate = [shortDate substringToIndex:[shortDate length]]; NSString *newString = [NSString stringWithFormat:@"%@\n%@", text, shortDate]; self.numberOfLines = 2; self.textAlignment = 1;