Android java.time.LocalDateTime [英] Android java.time.LocalDateTime

查看:1268
本文介绍了Android java.time.LocalDateTime的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个Android应用程序,它应该通过我在服务器端开发的HTTP REST API接收java.time.LocalDateTime对象。

I am coding an Android application, which should receive a java.time.LocalDateTime object through an HTTP REST API that I developed in the server side.

问题是Android仍然在Java 7中,而java.time仅在Java 8中可用。

The problem is that Android is still in Java 7, and java.time is only available in Java 8.

有了这个说,表示包含变量的最佳方法是什么Android中的日期和时间?我不想使用sql.timestamp。

Having that said, what is the best way to represent a variable that contains date and time in Android? I prefer not to use sql.timestamp.

谢谢!

推荐答案

为什么在Joda-time的Android版本中使用 Date Calendar 以前的Java 8非常接近Java 8日期)?

Why bother you using Date or Calendar previous to Java 8 while the Android version of Joda-time (that is very close from the Java 8 dates) is available ?

以下是GIT回购/网站的更多信息:

Here is the GIT repo/website for more information :

https://github.com/dlew/joda-time-android

这篇关于Android java.time.LocalDateTime的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆