"use strict"; var luna_utils = {}; luna_utils.get_age_from_DOB = function(dd_mm_yyyy) { if (typeof dd_mm_yyyy !== "string") { return ""; } const refDate = new Date(); const match = /^(\d{1,2})\/(\d{1,2})\/(\d{2}|\d{4})$/.exec(dd_mm_yyyy.trim()); if (!match) { return ""; } dd_mm_yyyy = luna_d.parse_date(dd_mm_yyyy); const day = Number(match[1]); const month = Number(match[2]); const rawYear = Number(match[3]); const currentYear = refDate.getFullYear(); let year = rawYear; // Map 2-digit year into the most recent past/current year (e.g., 26 -> 2026, 95 -> 1995) if (match[3].length === 2) { const century = Math.floor(currentYear / 100) * 100; year = century + rawYear; if (year > currentYear) { year -= 100; } } // Construct in local time and verify calendar validity (e.g., rejects 31/02/2000) const dob = new Date(year, month - 1, day); if ( dob.getFullYear() !== year || dob.getMonth() !== month - 1 || dob.getDate() !== day ) { return ""; } const now = new Date(currentYear, refDate.getMonth(), refDate.getDate()); if (dob > now) { return ""; } let years = now.getFullYear() - dob.getFullYear(); let months = now.getMonth() - dob.getMonth(); let days = now.getDate() - dob.getDate(); if (days < 0) { months -= 1; // Days in the month immediately preceding `now` const daysInPrevMonth = new Date(now.getFullYear(), now.getMonth(), 0).getDate(); days += daysInPrevMonth; } if (months < 0) { years -= 1; months += 12; } return `${years} yr, ${months} month, ${days} days`; }; // $string = luna_utils.get_random_string(20); luna_utils.get_random_string = function(length) { var letters = 'abcdefghijklmnopqrstuvwxyz'; let result = ''; var randomIndex; for (let i = 0; i < length; i++) { randomIndex = Math.floor(Math.random() * letters.length); result += letters[randomIndex]; } return result; }; luna_utils.escapeHtml = function(html_code) { return $('
<\/p>\r\n\r\n
<\/p>"},{"CONTENT_ID":"943","MENU_LABEL":"Latest News","PAGE_TITLE":"","EXTERNAL_URL":"","CONTENT_TYPE_ID":"5","META_DESCRIPTION":"","META_KEYWORDS":"","CONTENT_DIR":"\/content\/85\/943\/","ATTACHMENTS":[],"IMAGES":[],"IMAGES_INFO":"[]","PLAIN_TEXT_CONTENT":"
We value the contribution of parents towards our shared mission of growing friendly, thoughtful and active children.<\/p>"},{"CONTENT_ID":"946","MENU_LABEL":"Campus Feature 2","PAGE_TITLE":"","EXTERNAL_URL":"","CONTENT_TYPE_ID":"8","META_DESCRIPTION":"","META_KEYWORDS":"","CONTENT_DIR":"\/content\/85\/946\/","ATTACHMENTS":[],"IMAGES":[],"IMAGES_INFO":"[]","PLAIN_TEXT_CONTENT":"","HTML_CONTENT":"
The advanced and enabled option of its transport facility reliefs parents from taking the stress of reaching their child home safely.<\/p>"},{"CONTENT_ID":"947","MENU_LABEL":"Campus Feature 3","PAGE_TITLE":"","EXTERNAL_URL":"","CONTENT_TYPE_ID":"8","META_DESCRIPTION":"","META_KEYWORDS":"","CONTENT_DIR":"\/content\/85\/947\/","ATTACHMENTS":[],"IMAGES":[],"IMAGES_INFO":"[]","PLAIN_TEXT_CONTENT":"","HTML_CONTENT":"
The studio is equipped with interactive smart boards, laptops, Lego kits and other innovative resources thus making our students techno smart.<\/p>"},{"CONTENT_ID":"948","MENU_LABEL":"Testimonial 1","PAGE_TITLE":"","EXTERNAL_URL":"","CONTENT_TYPE_ID":"8","META_DESCRIPTION":"","META_KEYWORDS":"","CONTENT_DIR":"\/content\/85\/948\/","ATTACHMENTS":[],"IMAGES":[],"IMAGES_INFO":"[]","PLAIN_TEXT_CONTENT":"","HTML_CONTENT":"
When I researched the programmes available I realized that the University was offering exactly the type of programme in international development that interested me.<\/p>\r\n\r\n
- Sherlin's Parents, Class X (A)<\/p>"},{"CONTENT_ID":"949","MENU_LABEL":"Testimonial 2","PAGE_TITLE":"","EXTERNAL_URL":"","CONTENT_TYPE_ID":"8","META_DESCRIPTION":"","META_KEYWORDS":"","CONTENT_DIR":"\/content\/85\/949\/","ATTACHMENTS":[],"IMAGES":[],"IMAGES_INFO":"[]","PLAIN_TEXT_CONTENT":"","HTML_CONTENT":"
The support of the teachers has been outstanding. They are willing to try new things and help my child grow and learn at her own pace. We are blessed to belong to the Decagon community.<\/p>\r\n\r\n
- Bryan's Parents, Class II (C)<\/p>"},{"CONTENT_ID":"950","MENU_LABEL":"Testimonial 3","PAGE_TITLE":"","EXTERNAL_URL":"","CONTENT_TYPE_ID":"8","META_DESCRIPTION":"","META_KEYWORDS":"","CONTENT_DIR":"\/content\/85\/950\/","ATTACHMENTS":[],"IMAGES":[],"IMAGES_INFO":"[]","PLAIN_TEXT_CONTENT":"","HTML_CONTENT":"
The experience is like no other, the topics addressed are debated by students from other countries who live in different realities. Such cultural diversity is shared online and results in an incomparable knowledge degree.<\/p>\r\n\r\n
- Richard's Parents VI (B)<\/p>"},{"CONTENT_ID":"951","MENU_LABEL":"Quick Links","PAGE_TITLE":"","EXTERNAL_URL":"","CONTENT_TYPE_ID":"8","META_DESCRIPTION":"","META_KEYWORDS":"","CONTENT_DIR":"\/content\/85\/951\/","ATTACHMENTS":[{"FILE_NAME":"Mandatory_Public_Disclosure.pdf","FILE_SIZE_KB":115.06,"WIDTH":null,"HEIGHT":null,"FULL_FILE_NAME":"\/content\/85\/951\/attachments\/Mandatory_Public_Disclosure.pdf"}],"IMAGES":[],"IMAGES_INFO":"[]","PLAIN_TEXT_CONTENT":"","HTML_CONTENT":"