mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
23 lines
539 B
C++
23 lines
539 B
C++
#pragma once
|
|
|
|
#include <iostream>
|
|
#include <cxxtest/TestSuite.h>
|
|
|
|
#include "pugixml.hpp"
|
|
#include <xlnt/xlnt.hpp>
|
|
|
|
class test_number_style : public CxxTest::TestSuite
|
|
{
|
|
public:
|
|
void test_simple_date()
|
|
{
|
|
auto date = xlnt::date(2016, 6, 18);
|
|
auto date_number = date.to_number(xlnt::calendar::windows_1900);
|
|
|
|
xlnt::number_format ns = xlnt::number_format::date_ddmmyyyy();
|
|
auto formatted = ns.format(date_number, xlnt::calendar::windows_1900);
|
|
|
|
TS_ASSERT_EQUALS(formatted, "18/06/16");
|
|
}
|
|
};
|