mouamle Posted May 29, 2015 Share Posted May 29, 2015 السلام عليكم os.date() فنكشن بلغة ال Lua وضيفتها تجيب التاريخ الي في النظام صح ؟ اكدر استخدمها ب Mta ? Link to comment
Walid Posted May 29, 2015 Share Posted May 29, 2015 use getRealTime ( ) Example function Date ( ) local RealTime = getRealTime ( ) return string.format ( "%04d/%02d/%02d", RealTime.year + 1900, RealTime.month + 1, RealTime.monthday ), end Link to comment
mouamle Posted May 29, 2015 Author Share Posted May 29, 2015 use getRealTime ( ) Example function Date ( ) local RealTime = getRealTime ( ) return string.format ( "%04d/%02d/%02d", RealTime.year + 1900, RealTime.month + 1, RealTime.monthday ), end Thank you اذا اريدها تجيب الوقت ثانية . دقيقة . ساعة S, M, H ? Link to comment
Walid Posted May 29, 2015 Share Posted May 29, 2015 اذا اريدها تجيب الوقت ثانية . دقيقة . ساعة S, M, H ? You can use sth like this string.format ( "%02d:%02d:%02d", RealTime.hour, RealTime.minute, RealTime.second ) Link to comment
mouamle Posted May 29, 2015 Author Share Posted May 29, 2015 اذا اريدها تجيب الوقت ثانية . دقيقة . ساعة S, M, H ? You can use sth like this string.format ( "%02d:%02d:%02d", RealTime.hour, RealTime.minute, RealTime.second ) Thank you again Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now