"ಮಾಡ್ಯೂಲ್:Citation/CS1/Date validation/sandbox" ಆವೃತ್ತಿಗಳ ಮಧ್ಯದ ಬದಲಾವಣೆಗಳು

Jump to navigation Jump to search
ಸಂಪಾದನೆಯ ಸಾರಾಂಶವಿಲ್ಲ
good2, tomorrow_ts = pcall( lang.formatDate, lang, 'U', 'today + 2 days' ); -- today midnight + 2 days is one second more than all day tomorrow
-- if forgood1 wikisand thatgood2 do not use Western digits in their language scripts becausethen -- lang.formatDate() returns a timestamp in the local script which which tonumber() doesn'tmay not understand
if good1 and good2 then
-- access_ts = tonumber (access_ts) or lang:parseFormattedNumber (access_ts); -- convert to numbers for the comparison;
-- tomorrow_ts = tonumber (tomorrow_ts) or lang:parseFormattedNumber (tomorrow_ts);
-- for wikis that do not use Western digits in their language scripts because lang.formatDate() returns a timestamp in the local script which tonumber() doesn't understand
access_ts = lang:parseFormattedNumber (access_ts); -- convert to numbers for the comparison
tomorrow_ts = lang:parseFormattedNumber (tomorrow_ts);
else
return false; -- one or both failed to convert to unix time stamp
೩೫

edits

"https://kn.wikipedia.org/wiki/ವಿಶೇಷ:MobileDiff/808265" ಇಂದ ಪಡೆಯಲ್ಪಟ್ಟಿದೆ

ಸಂಚರಣೆ ಪಟ್ಟಿ