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
 
(22 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 getRegnal = require( 'Module:British regnal year' ).main
local japaneseEra = require( 'Module:Japanese calendar' ).era()
 
Baris 350 ⟶ 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 383 ⟶ 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 412 ⟶ 389:
bahai:setYearRange( year - 1844, year - 1843 )
box:addCalendar( bahai )
 
----------------------------------------------------------------------
-- ArmenianBalinese saka calendar
----------------------------------------------------------------------
local armenianbalinese = calendar:new()
armenianbalinese:setLink( 'Kalender ArmeniaBali' )
if year - 76 > 5510 then
koki balinese:setYearRange( year +- 66079, year - 78 )
end
box:addCalendar( armenianbalinese )
----------------------------------------------------------------------
-- Bengali calendar
Baris 460 ⟶ 447:
 
local heavenlyStems = {
{ '甲', '[[Kayu]]' }, -- 1
{ '乙', '[[Kayu]]' }, -- 2
{ '丙', '[[Api]]' }, -- 3
{ '丁', '[[Api]]' }, -- 4
{ '戊', '[[Tanah]]' }, -- 5
{ '己', '[[Tanah]]' }, -- 6
{ '庚', '[[Logam]]' }, -- 7
{ '辛', '[[Logam]]' }, -- 8
{ '壬', '[[Air]]' }, -- 9
{ '癸', '[[Air]]' } -- 10
}
 
Baris 611 ⟶ 598:
 
local holocene = calendar:new()
holocene:setLink( 'Kalender HoloceneHolosen' )
holocene:setYear( year + 10000 )
box:addCalendar( holocene )
Baris 643 ⟶ 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 651 ⟶ 638:
----------------------------------------------------------------------
 
local japanese = calendarGroupcalendar:new()
japanese:setLink( 'Kalender Jepang' )
 
Baris 669 ⟶ 656:
japanese:setYear( table.concat( japaneseYearText ) )
end
japanese:addCalendar( japanese )
-- Japanese imperial year
 
-- Kōki
local assyrianimperial = calendar:new()
assyrianimperial:setLink( 'KalenderTahun AsiriaJepang' )
assyrianimperial:setYear( year + 4750660 )
box:addCalendar( assyrianjapanese )
local koki = calendar:new()
koki:setLink( 'Tahun Jepang' ) -- use italics
koki:setYearRange( year + 660 )
japanese:addCalendar( koki )
 
box:addCalendarGroup( japanese )
 
----------------------------------------------------------------------
-- Javanese calendar
Baris 686 ⟶ 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 )