Modul:Year in other calendars: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
Tidak ada ringkasan suntingan
Tidak ada ringkasan suntingan
Tag: Suntingan perangkat seluler Suntingan peramban seluler Suntingan seluler lanjutan
 
(14 revisi perantara oleh 3 pengguna tidak ditampilkan)
Baris 4:
local makeNavbar = require( 'Module:Navbar' )._navbar
local numToRoman = require( 'Module:Roman' ).main
local numToArmenian = require( 'Module:Armenian' ).main
local japaneseEra = require( 'Module:Japanese calendar' ).era()
 
Baris 349 ⟶ 348:
-- Initiate the box and get the year values.
local init = args
init.navbar = 'YearTahun indalam otherkalender calendarslain'
local box = calendarBox:new( init )
local year = box.year
Baris 382 ⟶ 381:
box:addCalendar( gregorian )
 
----------------------------------------------------------------------
-- Armenian calendar
----------------------------------------------------------------------
local armenian = calendar:new()
armenian:setLink( 'Kalender Armenia' )
if year > 551 then
local armenianYear = year - 551
armenian:setYear( mw.ustring.format( '%s<br />ԹՎ %s', armenianYear, numToArmenian( armenianYear ) ) )
end
box:addCalendar( armenian )
 
----------------------------------------------------------------------
-- Assyrian calendar
----------------------------------------------------------------------
 
local assyrian = calendar:new()
assyrian:setLink( 'Kalender Asiria' )
assyrian:setYear( year + 4750 )
box:addCalendar( assyrian )
----------------------------------------------------------------------
-- Bahá'í calendar
Baris 469 ⟶ 447:
 
local heavenlyStems = {
{ '甲', '[[Kayu]]' }, -- 1
{ '乙', '[[Kayu]]' }, -- 2
{ '丙', '[[Api]]' }, -- 3
{ '丁', '[[Api]]' }, -- 4
{ '戊', '[[Tanah]]' }, -- 5
{ '己', '[[Tanah]]' }, -- 6
{ '庚', '[[Logam]]' }, -- 7
{ '辛', '[[Logam]]' }, -- 8
{ '壬', '[[Air]]' }, -- 9
{ '癸', '[[Air]]' } -- 10
}
 
Baris 620 ⟶ 598:
 
local holocene = calendar:new()
holocene:setLink( 'Kalender HoloceneHolosen' )
holocene:setYear( year + 10000 )
box:addCalendar( holocene )
Baris 652 ⟶ 630:
local year1 = math.ceil( -islamicMult * ( year - islamicSub ) )
local year2 = math.ceil( -islamicMult * ( year - islamicSub + 1 ) )
islamic:setYear( mw.ustring.format( '%d BHSH&nbsp;– %d BHSH', year1, year2 ) )
end
box:addCalendar( islamic )
Baris 678 ⟶ 656:
japanese:setYear( table.concat( japaneseYearText ) )
end
 
-- Japanese imperial year
box:addCalendar( japanese )
----------------------------------------------------------------------
-- Japanese imperial year
----------------------------------------------------------------------
 
local imperial = calendar:new()
imperial:setLink( 'Tahun Jepang' )
imperial:setYear( year + 660 )
box:addCalendar( imperial )
box:addCalendar( armenianjapanese )
----------------------------------------------------------------------
Baris 696 ⟶ 671:
local javanese = calendar:new()
javanese:setLink( 'Kalender Jawa' )
local islamicMultjavaneseMult = 1.030684 -- the factor to multiply by
local islamicSubjavaneseSub = 124.56439 -- the factor to subtract by
if year - 124 > 0 then
local year1 = math.floor( islamicMultjavaneseMult * ( year - islamicSubjavaneseSub ) )
local year2 = math.floor( islamicMultjavaneseMult * ( year - islamicSubjavaneseSub + 1 ) )
javanese:setYearRange( year1, year2 )
else
local year1 = math.ceil( -islamicMultjavaneseMult * ( year - islamicSubjavaneseSub ) )
local year2 = math.ceil( -islamicMultjavaneseMult * ( year - islamicSubjavaneseSub + 1 ) )
end
box:addCalendar( javanese )