SOL9 Sample: LocalTime

SOL9 2.0 Samples

1 Screenshot


2 Source code

/*
 * LocalTime.cpp 
 * Copyright (c) 2015 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */


// 2015/12/27

#include <sol/Locale.h>
#include <sol/LocalTime.h>


int main(int argc, char* argv[])
{
  Locale locale;

  try {
    LocalTime time1;
    time1.display();
  
    LocalTime time2 = time1.add(6, 1, 0, 0, 0, 0);
    time2.display();
  
    LocalTime time3 = time1.sub(1, 1, 0, 0, 0, 0);
    time3.display();
  
    LocalTime t1;
    LocalTime t2(3000);
    t1.display();
    t2.display();
     
    LocalTime t3 = t1 + t2;
    t3.display();
 
   LocalTime t4 = t1 - t2;
   t4.display();
     
 } catch (Exception& ex) {
  ex.display();
 }

 return 0;
}

Last modified: 2 May 2016

Copyright (c) 2016 Antillia.com ALL RIGHTS RESERVED.