NSDateFormatter “Month” in 3 letters instead of full word

后端 未结 7 1354
一生所求
一生所求 2021-02-01 03:00
    NSDateFormatter* formatter = [[NSDateFormatter alloc] init];
    [formatter setDateFormat:@\"dd-MM-YYYY HH:mm\"];        
    [formatter setTimeZone:[NSTimeZone syst         


        
7条回答
  •  野的像风
    2021-02-01 03:20

    In SWIFT

    let dateFormatter = NSDateFormatter()
    
    dateFormatter.dateFormat = "dd MMM yyyy HH:mm"
    
    dateFormatter.stringFromDate(NSDate())
    

提交回复
热议问题