当前位置: 首页 > news >正文

网站报备流程专业的门户网站建设方案

网站报备流程,专业的门户网站建设方案,建网站公司 优帮云,网站是不是网页1.localDateTime类格式化和解析 概念 #xff08;1#xff09;格式化:把localDateTime对象转换为String,需通过DateTimeFormatter对象指定格式 #xff08;2#xff09;解析:把String转换为localDateTime对象,需通过DateTimeFormatter对象指定格式 注#xff1a;localDat…1.localDateTime类格式化和解析 概念 1格式化:把localDateTime对象转换为String,需通过DateTimeFormatter对象指定格式 2解析:把String转换为localDateTime对象,需通过DateTimeFormatter对象指定格式 注localDateTime使用parse解析时键盘录入需要格式完全一致如8月输入08而JDK7中的解析输入8即可。 public class Demo4 {public static void main(String[] args) {LocalDateTime ldt LocalDateTime.now();System.out.println(--------------格式化-------------------);//localDateTime对象调用format(参数为DateTimeForTime对象)//String str ldt.format(DateTimeFormatter.ofPattern(yyyy-MM-dd HH:mm:ss));DateTimeFormatter dateTimeFormatter DateTimeFormatter.ofPattern(yyyy-MM-dd HH:mm:ss);String str ldt.format(dateTimeFormatter);// DateTimeForTime类调用ofPattern(同时设置时间格式)静态方法得到对象System.out.println(str);System.out.println(---------------解析-------------------);// localDateTime类名调用parse(同时设置时间格式)方法//LocalDateTime parse ldt.parse(str, DateTimeFormatter.ofPattern(yyyy-MM-dd HH:mm:ss));LocalDateTime parse ldt.parse(str, dateTimeFormatter);//注意,解析的对象精度必须和解析一致System.out.println(parse);//parse为LocalDateTime对象可调用方法);} }打印结果 ------------------------------------------------------------ 2021-06-29 21:32:00 2021-06-29T21:322.localDateTime类与localDate类、localDateTime类的转化 //localDateTime[天时分秒]转换为 // localDate[精度为天] localTime[精度为时分秒] public class Demo3 {public static void main(String[] args) {LocalDateTime ldt LocalDateTime.of(2020, 10, 10, 10, 10, 10);// localDate[精度为天]LocalDate localDate ldt.toLocalDate();//localTime[精度为时分秒]LocalTime localTime ldt.toLocalTime();System.out.println(localDate);System.out.println(localTime);} }打印结果 ------------------------------------------------------------- 2020-10-10 10:10:10
http://www.pierceye.com/news/13804/

相关文章:

  • 龙华做棋牌网站建设多少钱wordpress 图文混排
  • 济南做网站互联网公司排名亳州市建设局网站
  • 成都网站改版seo综合查询是什么
  • 网站设计简单讲解学网站制作
  • 网站建设的域名广州市天河区发布
  • 网站不备案访问青岛网站平台开发
  • 济宁建设局网站一屏式网站有什么好处
  • 重庆响应式网站设计通过电子邮件发布 wordpress
  • vs网站中的轮播怎么做山西网站建设推荐咨询
  • 免费看今天开始做女神的网站栾城区住房建设局官方网站
  • 品牌网站建设9小蝌蚪9重庆网站推广营销价格
  • pc手机一体网站阿里建站系统
  • 重庆网站建设夹夹虫公司东莞网络排名优化
  • 莆田外贸建站泰安网站建设开发公司
  • 运营怎么做网站排名在哪里优化
  • 建协网官方网站什么营销软件好用
  • 郑州高端装修设计公司朝阳网站关键词优化
  • 网站表格代码做网站是否要备案
  • app营销型网站的特点wordpress sozo
  • 漳州市网站建设价格论坛
  • 个人电脑做网站服务器网站搜索引擎优化的主要策略
  • 杭州公司网站建设哪家好建设网站是否等于开展网络营销
  • 做视频网站怎么挣钱新做好的网站如何做seo
  • 小说网站建设费用it外包公司为什么不能去
  • 有电脑网站怎样建手机号码有哪些做汽车变速箱的门户网站
  • 做网站好学吗怎样登网站
  • app展示网站模板湛江有那些网站制作公司
  • 高端企业门户网站建设服务公司wordpress中常用插件
  • 襄阳电商网站建设前端做微网站
  • 东莞市住房建设网站人人快速开发平台