Erlang - date 方法
此方法返回当前系统日期。
语法
date()
参数
None
返回值
当前日期以列表形式返回。
例如
-module(helloworld).
-export([start/0]).
start() ->
io:fwrite("~p~n",[date()]).
输出
当我们运行上面的程序时,我们将得到以下结果。 日期值取决于当前系统日期。 示例如下 −
{2016,4,17}
此方法返回当前系统日期。
date()
None
当前日期以列表形式返回。
-module(helloworld).
-export([start/0]).
start() ->
io:fwrite("~p~n",[date()]).
当我们运行上面的程序时,我们将得到以下结果。 日期值取决于当前系统日期。 示例如下 −
{2016,4,17}
