SlideShare a Scribd company logo
1 of 1
Download to read offline
* Requied for Android app.
1- Layout code.
2- Java code Design a small app to convert from Hijri to Gregorian and vice versa (keep it simple
as if on input 2016 you get 1437).
Solution
import org.joda.time.Chronology;
import org.joda.time.LocalDate;
import org.joda.time.chrono.IslamicChronology;
import org.joda.time.chrono.ISOChronology;
public class Test {
public static void main(String[] args) throws Exception {
Chronology iso = ISOChronology.getInstanceUTC();
Chronology hijri = IslamicChronology.getInstanceUTC();
LocalDate todayIso = new LocalDate(2016, 3, 31, iso);
LocalDate todayHijri = new LocalDate(todayIso.toDateTimeAtStartOfDay(),
hijri);
System.out.println(todayHijri); // 1437-05-19
}
}

More Related Content

More from FashionColZone

Briefly describe three processing schema used in cochlear implants..pdf
Briefly describe three processing schema used in cochlear implants..pdfBriefly describe three processing schema used in cochlear implants..pdf
Briefly describe three processing schema used in cochlear implants..pdf
FashionColZone
 
You will write a multi-interface version of the well-known concentra.pdf
You will write a multi-interface version of the well-known concentra.pdfYou will write a multi-interface version of the well-known concentra.pdf
You will write a multi-interface version of the well-known concentra.pdf
FashionColZone
 
1.Define culture. How can culture be conceptionalized Your resp.pdf
1.Define culture. How can culture be conceptionalized Your resp.pdf1.Define culture. How can culture be conceptionalized Your resp.pdf
1.Define culture. How can culture be conceptionalized Your resp.pdf
FashionColZone
 
QUESTION 18A company has a signed contract for a credit sale of pr.pdf
QUESTION 18A company has a signed contract for a credit sale of pr.pdfQUESTION 18A company has a signed contract for a credit sale of pr.pdf
QUESTION 18A company has a signed contract for a credit sale of pr.pdf
FashionColZone
 

More from FashionColZone (18)

A Fullerene is a 3-regular planar graph with faces of degree 5 and 6.pdf
A Fullerene is a 3-regular planar graph with faces of degree 5 and 6.pdfA Fullerene is a 3-regular planar graph with faces of degree 5 and 6.pdf
A Fullerene is a 3-regular planar graph with faces of degree 5 and 6.pdf
 
Assume that the paired date came from a population that is normally .pdf
Assume that the paired date came from a population that is normally .pdfAssume that the paired date came from a population that is normally .pdf
Assume that the paired date came from a population that is normally .pdf
 
Briefly describe three processing schema used in cochlear implants..pdf
Briefly describe three processing schema used in cochlear implants..pdfBriefly describe three processing schema used in cochlear implants..pdf
Briefly describe three processing schema used in cochlear implants..pdf
 
A satellite moves in a circular orbit around Earth at a speed of 470.pdf
A satellite moves in a circular orbit around Earth at a speed of 470.pdfA satellite moves in a circular orbit around Earth at a speed of 470.pdf
A satellite moves in a circular orbit around Earth at a speed of 470.pdf
 
7. What do we mean by “spreading signal”in CDMA systems16. Name a.pdf
7. What do we mean by “spreading signal”in CDMA systems16. Name a.pdf7. What do we mean by “spreading signal”in CDMA systems16. Name a.pdf
7. What do we mean by “spreading signal”in CDMA systems16. Name a.pdf
 
You will write a multi-interface version of the well-known concentra.pdf
You will write a multi-interface version of the well-known concentra.pdfYou will write a multi-interface version of the well-known concentra.pdf
You will write a multi-interface version of the well-known concentra.pdf
 
You are interested in using the plasmid pGEE as a vector for incorpor.pdf
You are interested in using the plasmid pGEE as a vector for incorpor.pdfYou are interested in using the plasmid pGEE as a vector for incorpor.pdf
You are interested in using the plasmid pGEE as a vector for incorpor.pdf
 
Why animals migrate I need 5 new ideas (exclude reproduction , s.pdf
Why animals migrate  I need 5 new ideas (exclude  reproduction , s.pdfWhy animals migrate  I need 5 new ideas (exclude  reproduction , s.pdf
Why animals migrate I need 5 new ideas (exclude reproduction , s.pdf
 
Which of the following characteristics of the fetus distinguishes it.pdf
Which of the following characteristics of the fetus distinguishes it.pdfWhich of the following characteristics of the fetus distinguishes it.pdf
Which of the following characteristics of the fetus distinguishes it.pdf
 
What are the major sources of cash (inflows) in a statement of cash .pdf
What are the major sources of cash (inflows) in a statement of cash .pdfWhat are the major sources of cash (inflows) in a statement of cash .pdf
What are the major sources of cash (inflows) in a statement of cash .pdf
 
TYPES OF AUDIT1. Is there an internal audit function within your o.pdf
TYPES OF AUDIT1. Is there an internal audit function within your o.pdfTYPES OF AUDIT1. Is there an internal audit function within your o.pdf
TYPES OF AUDIT1. Is there an internal audit function within your o.pdf
 
The total exergy is an extensive property of a system. True or False.pdf
The total exergy is an extensive property of a system. True or False.pdfThe total exergy is an extensive property of a system. True or False.pdf
The total exergy is an extensive property of a system. True or False.pdf
 
1.Define culture. How can culture be conceptionalized Your resp.pdf
1.Define culture. How can culture be conceptionalized Your resp.pdf1.Define culture. How can culture be conceptionalized Your resp.pdf
1.Define culture. How can culture be conceptionalized Your resp.pdf
 
The assembly instruction implemented at the OS4 level isSelect on.pdf
The assembly instruction implemented at the OS4 level isSelect on.pdfThe assembly instruction implemented at the OS4 level isSelect on.pdf
The assembly instruction implemented at the OS4 level isSelect on.pdf
 
Select all of the following that are true of the middle, lipid portio.pdf
Select all of the following that are true of the middle, lipid portio.pdfSelect all of the following that are true of the middle, lipid portio.pdf
Select all of the following that are true of the middle, lipid portio.pdf
 
QUESTION 18A company has a signed contract for a credit sale of pr.pdf
QUESTION 18A company has a signed contract for a credit sale of pr.pdfQUESTION 18A company has a signed contract for a credit sale of pr.pdf
QUESTION 18A company has a signed contract for a credit sale of pr.pdf
 
Question 1 On 21 November, the weekly payroll register of Python Ltd .pdf
Question 1 On 21 November, the weekly payroll register of Python Ltd .pdfQuestion 1 On 21 November, the weekly payroll register of Python Ltd .pdf
Question 1 On 21 November, the weekly payroll register of Python Ltd .pdf
 
Please give me an example code of a complex PovRay Program that crea.pdf
Please give me an example code of a complex PovRay Program that crea.pdfPlease give me an example code of a complex PovRay Program that crea.pdf
Please give me an example code of a complex PovRay Program that crea.pdf
 

Recently uploaded

SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
CaitlinCummins3
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
Peter Brusilovsky
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
中 央社
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 

Recently uploaded (20)

Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 

Requied for Android app.1- Layout code.2- Java code Design a s.pdf

  • 1. * Requied for Android app. 1- Layout code. 2- Java code Design a small app to convert from Hijri to Gregorian and vice versa (keep it simple as if on input 2016 you get 1437). Solution import org.joda.time.Chronology; import org.joda.time.LocalDate; import org.joda.time.chrono.IslamicChronology; import org.joda.time.chrono.ISOChronology; public class Test { public static void main(String[] args) throws Exception { Chronology iso = ISOChronology.getInstanceUTC(); Chronology hijri = IslamicChronology.getInstanceUTC(); LocalDate todayIso = new LocalDate(2016, 3, 31, iso); LocalDate todayHijri = new LocalDate(todayIso.toDateTimeAtStartOfDay(), hijri); System.out.println(todayHijri); // 1437-05-19 } }