Julian Date Conversion - Calculate Julian date or modified Julian date (2024)

Calculate Julian date or modified Julian date

expand all in page

  • Julian Date Conversion - Calculate Julian date or modified Julian date (1)

Libraries:
Aerospace Blockset / Utilities / Unit Conversions

Description

The Julian Date Conversion block converts the specified date to the Juliandate or modified Julian date.

Limitations

  • This block is valid for all common era (CE) dates in the Gregoriancalendar.

  • The calculation of Julian date does not take into account leap seconds.

Ports

Input

expand all

Clock source for model simulation, specified as a scalar orarray.

Dependencies

The presence and label of this port depends on the Timeincrement parameter.

PortTime increment Setting

day

Day

hour

Hour

min

Min

sec

Sec

No inport port

None

Data Types: double

Output

expand all

Julian date, returned as a scalar or array.

Dependencies

Data Types: double

Parameters

expand all

Year, specified as a scalar, to calculate the Julian date.

Programmatic Use

Block Parameter:year
Type: character vector
Values: double, greater than 1
Default:'2013'

Month to calculate the Julian date. From the list, select the month fromJanuary toDecember.

Programmatic Use

Block Parameter:month
Type: character vector
Values:'January' | 'February' |'March' | 'April' |'May' | 'June' |'July' | 'August' |'September' | 'October' |'November' |'December'
Default:'January'

Day to calculate the Julian date. From the list, select the day from1 to 31.

Programmatic Use

Block Parameter:day
Type: character vector
Values: '1'| '2' | '3' |'4' | '5' |'5' | '6' |'7' | '8' |'9' | '10' |'11' | '12' |'13' | '14' |'15' | '16' |'17' | '18' |'19' | '20' |'21' | '22' |'23' | '24' |'25' | '26' |'27' | '28' |'29' | '30' |'31'
Default:'1'

Hour used to calculate the Julian date. Enter a value from0 to 24.

Programmatic Use

Block Parameter:hour
Type: character vector
Values: double, whole number,0 to 24
Default:'0'

Minutes to calculate the Julian date. Enter a number from0 to 60.

Programmatic Use

Block Parameter:min
Type: character vector
Values: double, whole number,0 to 60
Default:'0'

Specify the seconds used to calculate the Julian date. Enter a number from0 to 60.

Programmatic Use

Block Parameter:sec
Type: character vector
Values: double, whole number,0 to 60
Default:'0'

Select this check box to calculate the modified Julian date (MJD) forcorresponding elements of the year, month, day, hour, minute, andsecond.

Dependencies

Selecting this check box changes the output port label to MJD.Clearing this check box changes the output port label to JD.

Programmatic Use

Block Parameter:modflag
Type: character vector
Values: 'on'| 'off'
Default:'off'

Time increment between the specified date and the desired model simulationtime. The block adjusts the calculated Julian date to take into account thetime increment from model simulation. For example, selectingDay and connecting a simulation timer to the portmeans that each time increment unit is one day and the block adjusts itscalculation based on that simulation time.

If you select None, the calculated Julian date does nottake into account the model simulation time. Selecting this option removesthe first block input.

Dependencies

This parameter controls the presence and label of output port.

Time increment SettingPort

Day

day

Hour

hour

Min

min

Sec

sec

None

No inport port

Programmatic Use

Block Parameter:deltaT
Type: character vector
Values:'Day' | 'Hour' |'Min' | 'Sec' |'None'
Default:'Day'

Out-of-range block behavior, specified as follows.

ActionDescription

None

No action.

Warning

Warning in the Diagnostic Viewer, model simulation continues.

Error (default)

Error in the Diagnostic Viewer, model simulation stops.

Programmatic Use

Block Parameter: errorflag
Type: character vector
Values: 'None' | 'Warning' | 'Error'
Default: 'Error'

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2013b

See Also

juliandate

MATLAB 命令

您点击的链接对应于以下 MATLAB 命令:

 

请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。

Julian Date Conversion - Calculate Julian date or modified Julian date (2)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

Americas

Europe

Asia Pacific

Contact your local office

Julian Date Conversion - Calculate Julian date or modified Julian date (2024)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Foster Heidenreich CPA

Last Updated:

Views: 6671

Rating: 4.6 / 5 (56 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Foster Heidenreich CPA

Birthday: 1995-01-14

Address: 55021 Usha Garden, North Larisa, DE 19209

Phone: +6812240846623

Job: Corporate Healthcare Strategist

Hobby: Singing, Listening to music, Rafting, LARPing, Gardening, Quilting, Rappelling

Introduction: My name is Foster Heidenreich CPA, I am a delightful, quaint, glorious, quaint, faithful, enchanting, fine person who loves writing and wants to share my knowledge and understanding with you.