יחידה:תאריך: הבדלים בין גרסאות בדף

מ שחזור לגרסה 22149092 מאת ערן
מאין תקציר עריכה
שורה 552: שורה 552:
function Date:toHebrewString()
function Date:toHebrewString()
local hebrewStr = ''
local hebrewStr = ''
if (self.precision >= Date.PRECISION.MY100) and (self.precision <= Date.PRECISION.MY) then
if self.year>0 then
        return (self.year/1000000) .. ' מיליון שנים לספירה'
        else
        return (-self.year/1000000) ..' מיליון שנים לפנה״ס'
        end
end
if (self.precision >=Date.PRECISION.KY100) and (self.precision <= Date.PRECISION.KY) then
if self.year>0 then
        return 'האלף ה־'.. (self.year/1000)
        else
        return 'האלף ה־'.. (-self.year/1000) ..' לפנה״ס'
        end
end
if self.precision == Date.PRECISION.YEAR100 then
if self.year>0 then
        return 'המאה ה־'.. (self.year/100)
        else
        return 'המאה ה־'.. (-self.year/100) ..' לפנה״ס'
        end
    end
   
     if self.year ~= nil then
     if self.year ~= nil then
         if self.year < 0 then
         if self.year < 0 then
שורה 565: שורה 588:


     --month
     --month
     if self.precision < Date.PRECISION.MONTH then
     if self.precision>=Date.PRECISION.YEAR and self.precision < Date.PRECISION.MONTH then
         return hebrewStr
         return hebrewStr
     end
     end