03-29-2017 8:14 PM
03-29-2017 9:38 PM
ABAP counts days from 00010101. The switch from Julian to the Gregorian calendar is handled in the conversion rules from numeric to date and vice versa as follows:
So ABAP does it itself. What should a conversion between Julian and Gregorian calendar be about? If you want to calculate anything, the above rules should be sufficient.
03-29-2017 10:55 PM
Rather curious about the story behind this question... Are there businesses using Julian calendar? Some Orthodox Church runs SAP? Need to run the financial reports for the 15th century? Some ABAP trainer is pulling your leg?
Scratching my head here why would this be possibly needed...
03-29-2017 11:17 PM
It's not for any business purpose. I was just attempting too write some practice code that converts Julian calendar date to the Gregorian calendar. I'm a junior developer and trying work on my skills.
03-30-2017 6:19 AM
I fully agree with Horst answer. But just to say about the nature of the question: converting a date from Julian calendar to Gregorian is mostly non-sense: the Gregorian calendar has replaced the Julian calendar, officially from October 5th 1582, as Horst says (in many countries, and adopted by others later).
If your question is more about "if the Julian calendar had continued in some countries after 4.10.1582, how could we translate a Julian date after 4.10.1582 into Gregorian calendar?" then:
03-30-2017 7:55 PM
IMHO you need better examples to polish your skills. There is no point choosing a conversion that makes no sense (as Sandra also pointed out). Now converting, say, a calendar date into a fiscal period - that's something you are likely to actually use in real life.
Why not just search for the date conversion questions on SCN and then attempt solutions? Although realy, date conversion is usually a simple FM or method call, so hardly any skill is needed for that (IMHO, again).
Good luck.
03-31-2017 10:15 AM
You could give the link where you copied from, e.g. http://aa.usno.navy.mil/faq/docs/JD_Formula.php
04-01-2017 7:45 AM
Copying other people's work is plagiarism and strictly forbidden. It can lead to account suspension.
04-01-2017 10:40 AM
Say, is the question about Julian Day and not about Julian Calendar? That at least would make some sense.
According to http://quasar.as.utexas.edu/BillInfo/JulianDatesG.html the astronomer´s julian day was even invented by a different Julius (not good ol´ Gaius Julius Cesar).
Googling the web you find some pages that present formulas and code snippets that show how to convert between Gregorian Dates and Julian Days.
All you have to do is to write some basic ABAP that implements these formulas.