AnonSec Shell
Server IP : 68.65.120.251  /  Your IP : 18.220.121.27   [ Reverse IP ]
Web Server : LiteSpeed
System : Linux server105.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User : travtpib ( 6521)
PHP Version : 7.4.33
Disable Function : NONE
Domains : 1 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/libicu/usr/share/doc/alt-libicu-devel/samples/datecal/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /opt/alt/libicu/usr/share/doc/alt-libicu-devel/samples/datecal/ccal.c
/*
*******************************************************************************
*
*   © 2016 and later: Unicode, Inc. and others.
*   License & terms of use: http://www.unicode.org/copyright.html#License
*
*******************************************************************************
*******************************************************************************
*
*   Copyright (C) 2002-2003, International Business Machines
*   Corporation and others.  All Rights Reserved.
*
*******************************************************************************
*/

#include "unicode/ucal.h"
#include <stdio.h>

void c_main()
{
  puts("----");
  puts("C Sample");

UErrorCode status = U_ZERO_ERROR;
int32_t i;
UCalendar *cal = ucal_open(NULL, -1, NULL, UCAL_GREGORIAN, &status);
if (U_FAILURE(status)) {
      puts("Couldn't create GregorianCalendar");
      return;
      }
      /* set up the date */
      ucal_set(cal, UCAL_YEAR, 2000);
      ucal_set(cal, UCAL_MONTH, UCAL_FEBRUARY);   /* FEBRUARY */
      ucal_set(cal, UCAL_DATE, 26);
      ucal_set(cal, UCAL_HOUR_OF_DAY, 23);
      ucal_set(cal, UCAL_MINUTE, 0);
      ucal_set(cal, UCAL_SECOND, 0);
      ucal_set(cal, UCAL_MILLISECOND, 0);
      /* Iterate through the days and print it out. */
      for (i = 0; i < 30; i++) {
          /* print out the date. */
          /* You should use the udat_* API to properly format it */
          printf("year: %d, month: %d (%d in the implementation), day: %d\n",
              ucal_get(cal, UCAL_YEAR, &status),
              ucal_get(cal, UCAL_MONTH, &status) + 1,
              ucal_get(cal, UCAL_MONTH, &status),
              ucal_get(cal, UCAL_DATE, &status));
          if (U_FAILURE(status)) {
          puts("Calendar::get failed");
          return;
          }
          /* Add a day to the date */
          ucal_add(cal, UCAL_DATE, 1, &status);
          if (U_FAILURE(status))
          {
              puts("Calendar::add failed");
              return;
          }
      }
      ucal_close(cal);  
}

Anon7 - 2022
AnonSec Team