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

מאין תקציר עריכה
מאין תקציר עריכה
שורה 8: שורה 8:
properties_cats = {}; -- for categorizing citations based on certain properties, language of source for instance
properties_cats = {}; -- for categorizing citations based on certain properties, language of source for instance
}
}
function local_date( date )
function local_date( date )
  return mw.ustring.format( '<span style="direction:rtl;unicode-bidi:embed;">%s</span>', mw.getContentLanguage():formatDate('j xg Y', Date)) -- local canonical format for dates
return mw.getContentLanguage():formatDate('j xg Y', date)
end
end


שורה 2,419: שורה 2,418:
local text;
local text;
local pgtext = Position .. Page .. Pages .. At;
local pgtext = Position .. Page .. Pages .. At;
-- local canonical format for dates
if is_set(Date) then
if is_set(Date) then
IsValidDate, LocalDate = pcall(local_date, Date)
IsValidDate, LocalDate = pcall(local_date, Date)
if IsValidDate then
if IsValidDate then
Date = LocalDate
Date = mw.ustring.format( '<span style="direction:rtl;unicode-bidi:embed;">%s</span>', LocalDate)
end
end
end
end