瀏覽代碼

Version 1.0.1

Fixed a small bug that made a zero padding when using 12h time format. (09:41 AM instead of 9:41 AM).
beta-future-time
Gil Shahar 8 年之前
父節點
當前提交
d215807af8
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. +2
    -2
      Tweak.xm

+ 2
- 2
Tweak.xm 查看文件

{ {
[dateFormatter setDateFormat:@"HH:mm"]; [dateFormatter setDateFormat:@"HH:mm"];
}else{ }else{
[dateFormatter setDateFormat:@"hh:mm a"];
[dateFormatter setDateFormat:@"h:mm a"];
} }
dateLabel.text = [dateFormatter stringFromDate:date]; dateLabel.text = [dateFormatter stringFromDate:date];
[dateLabel sizeToFit]; [dateLabel sizeToFit];
NSRange pmRange = [dateString rangeOfString:[formatter PMSymbol]]; NSRange pmRange = [dateString rangeOfString:[formatter PMSymbol]];
is24h = (amRange.location == NSNotFound && pmRange.location == NSNotFound); is24h = (amRange.location == NSNotFound && pmRange.location == NSNotFound);
[formatter release]; [formatter release];
}
}

Loading…
取消
儲存