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

江山网站建设58同城推广效果怎么样

江山网站建设,58同城推广效果怎么样,江苏国智建设有限公司网站,广州网站建设方案如何把String/Date转成LocalDateTime参考String、Date与LocalDate、LocalTime、LocalDateTime之间互转 String、Date、LocalDateTime、Calendar与时间戳之间互相转化参考String、Date、LocalDateTime、Calendar与时间戳之间互相转化 方法介绍 getYear() 获取日期的年 getMon…

如何把String/Date转成LocalDateTime参考String、Date与LocalDate、LocalTime、LocalDateTime之间互转

String、Date、LocalDateTime、Calendar与时间戳之间互相转化参考String、Date、LocalDateTime、Calendar与时间戳之间互相转化

方法介绍

getYear() 获取日期的年
getMonth().name() 获取日期的月的英文
getMonth().getValue() 获取日期的月的英文的数字
getDayOfYear() 获取日期是年中的第几天
getDayOfMonth() 获取日期是月中的第几天
getDayOfWeek().name() 获取周几的英文
getDayOfWeek().getValue() 获取周几的数字
getHour() 获取日期的小时
getMinute() 获取日期的分钟
getSecond() 获取日期的秒
getNano() 获取日期中纳秒

具体使用

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;/*** 测试LocalDate* @author leishen*/
public class LocalDateTest {/*** LOCAL_DATE_TIME的时间格式*/private static final DateTimeFormatter LOCAL_DATE_TIME=DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss ms ns");public static void main(String[] args) {//系统默认时区ZoneId zoneId = ZoneId.systemDefault();//Date-->ZonedDateTimeZonedDateTime zonedDateTime = new Date().toInstant().atZone(zoneId);LocalDateTime localDateTime = zonedDateTime.toLocalDateTime();System.out.println("localDateTime.format(LOCAL_DATE_TIME) = " + localDateTime.format(LOCAL_DATE_TIME));//getYear() 获取日期的年System.out.println("localDateTime.getYear() = " + localDateTime.getYear());//getMonth().name() 获取日期的月的英文System.out.println("localDateTime.getMonth().name() = " + localDateTime.getMonth().name());//getMonth().getValue() 获取日期的月的英文的数字System.out.println("localDateTime.getMonth().getValue() = " + localDateTime.getMonth().getValue());//getDayOfYear() 获取日期是年中的第几天System.out.println("localDateTime.getDayOfYear() = " + localDateTime.getDayOfYear());//getDayOfMonth() 获取日期是月中的第几天System.out.println("localDateTime.getDayOfMonth() = " + localDateTime.getDayOfMonth());//getDayOfWeek().name() 获取周几的英文System.out.println("localDateTime.getDayOfWeek().name = " + localDateTime.getDayOfWeek().name());//getDayOfWeek().getValue() 获取周几的数字System.out.println("localDateTime.getDayOfWeek().getValue() = " + localDateTime.getDayOfWeek().getValue());//getHour() 获取日期的小时System.out.println("localDateTime.getHour() = " + localDateTime.getHour());//getMinute() 获取日期的分钟System.out.println("localDateTime.getMinute() = " + localDateTime.getMinute());//getSecond() 获取日期的秒System.out.println("localDateTime.getSecond() = " + localDateTime.getSecond());//getNano() 获取日期中纳秒System.out.println("localDateTime.getNano() = " + localDateTime.getNano());}
}
http://www.zhongyajixie.com/news/3127.html

相关文章:

  • 网站上传的图片不显示首页关键词排名代发
  • seo 网站两个ip小红书seo关键词优化多少钱
  • 陈列设计师培训宜昌seo
  • 网站建设图片大小营销渠道有哪些
  • php和什么语言做网站百度推广的价格表
  • wordpress 慢的上天潍坊seo推广
  • 做网站税费服装品牌策划方案
  • 山东建设机械协会官方网站网站页面布局和样式设计
  • 帝国cms建站系统网络营销的十种方法
  • 图片手机网站建设关键词提取工具app
  • 做网站多少钱PageAdmin网站运营推广方案
  • 给别人做网站去掉版权广告关键词
  • 做网站模板的软件seo技术培训江门
  • 杭州模板网站建设系统微信运营工具
  • 长宁企业网站制作域名注册官网免费
  • 网站备案的要求广告位招商怎么找客户
  • 深圳网站设计公司让您放心省心seo优化培训机构
  • 舆情通seo推广费用
  • 雄安网建 网站建设网页关键词排名优化
  • 帝国cms网站公告怎么做百度一下百度搜索入口
  • 网站如何吸引蜘蛛关键词排名优化江苏的团队
  • 网站打不开别人能打开批量外链工具
  • 百度做的网站济南网站建设
  • 提供手机自适应网站建设谷歌ads广告投放
  • 网站搭建教程导航类百度游戏中心
  • 新乡网站建设价格企业网络营销策略案例
  • 建设的网站属于固定资产么站长之家ip地址查询
  • 做游戏网站需要注意的问题网络服务商
  • 小莉帮忙郑州阳光男科医院宁波seo教程推广平台
  • 开网站做商城怎么样新媒体运营培训学校