一、
获取
年月日时分秒public class Laugh {
public static void main(String[] args) {
System.out.println("
获取
当前
时间
为:"); //格式为:2021-10-12 16:48:14
Date date = new Date();
SimpleDateFormat f
NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
NSDate *now;
NSDateComponents *comps = [[NSDateComponents alloc] init];
NSInteger unitFlags = NSYearCalen
1、代码如下:import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
public class Test1 {
public static void main(String[]