我对这个问题感到相当困惑。
我想获取当前时间,然后根据条件添加所需的时间到当前时间。 例如:
current time = 06:47:10
//or should i hv to change this format to "2011-03-26 06:47:10 GMT"
if(a= 1 and b= min )
{ //add 1 min to
current time
}
else if(a= 1 and b= hour)
{ //add 1
hour to current time
}
else if(a= 1 and b=week )
{ //add 1
week to current time
}
只需要将上述条件的输出添加到当前时间即可。
请指导我如何实现。
谢谢。