【发布时间】:2013-12-13 11:09:27
【问题描述】:
这个问题有点奇怪,不好意思。
我在http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Pickerhttp://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Picker阅读了钛文档
我也看了题目Date and Time in picker view in android for titanium。
我想知道钛是否了解日期? 我必须将它用于两件事:用于日期选择器(在 android 上工作)和操作日期。
但是,当我尝试使用钛时,钛会发出非常糟糕的警报
date = new Date();
...
something(date.now());//alert here.
someotherthingorso(date.getTime());//alert here two if i delete the first.
那么,我们可以用钛上的 Date 做什么?只有构造函数和吸气剂对我有用。 是否有替代 date.now() 或 date.getTime() 有效?也适用于 datePicker。
【问题讨论】:
-
从未使用过钛,但链接的文档似乎表明在 Android 上使用具有整数值的微调器进行选择,从而允许您从各个组件中弥补日期。它不是一个日期对象,但它似乎是根据文档的方式。
-
试试
System.currentTimeInMilis() -
系统在钛上是未知的:)。但很好。 @@merlin @@François Whal 。明白了,我可以在没有实现 Date 对象或 dateTime 的情况下使用它。(看起来很奇怪)。
标签: javascript android date titanium