[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master d5096d9 11/13: Paste out to spreadsheet: show
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master d5096d9 11/13: Paste out to spreadsheet: show dates as YYYYMMDD |
Date: |
Tue, 8 May 2018 19:51:06 -0400 (EDT) |
branch: master
commit d5096d956c9d28f423d0228ad6dc070a248a5444
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Paste out to spreadsheet: show dates as YYYYMMDD
An eight-digit integer may seem unattractive, but it pastes back into
a census correctly.
---
census_view.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/census_view.cpp b/census_view.cpp
index f7a2a23..06a7ff8 100644
--- a/census_view.cpp
+++ b/census_view.cpp
@@ -1275,11 +1275,12 @@ void CensusView::paste_out_to_spreadsheet() const
{
for(auto const& header : distinct_headers)
{
- // Show calendar dates as YYYY-MM-DD rather than JDN.
+ // Show calendar dates as YYYYMMDD rather than JDN.
std::string s = cell[header].str();
if(exact_cast<tnr_date>(cell[header]))
{
- s = calendar_date(JdnToYmd(jdn_t(value_cast<int>(s)))).str();
+ long int z = JdnToYmd(jdn_t(value_cast<long int>(s))).value();
+ s = value_cast<std::string>(z);
}
// Assume that the trailing '\t' doesn't matter.
os << s << '\t';
- [lmi-commits] [lmi] master updated (05e57fd -> 0c90de6), Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master 1480161 06/13: Add more detail to a comment, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master bb36d25 02/13: Assert that measure-only and render passes have the same side effects, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master 86ed6fe 01/13: Correct a comment, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master fad1828 03/13: Explicitly assert some implicit assumptions, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master b0c3633 05/13: Improve documentation, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master d5096d9 11/13: Paste out to spreadsheet: show dates as YYYYMMDD,
Greg Chicares <=
- [lmi-commits] [lmi] master d92a865 09/13: Grow only multiline "Comments" control, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master a5d5799 10/13: Widen all date-picker controls, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master 274f13e 04/13: Assert that the clipping width is nonnegative, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master 6ac7331 07/13: Use a dummy name for a dummy variable, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master 0c90de6 13/13: Designate release candidate 20180508T2349Z, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master 7320efb 08/13: Adjust layout of certain controls, Greg Chicares, 2018/05/08
- [lmi-commits] [lmi] master fb91253 12/13: Revert "Store the last selected page of MvcController persistently", Greg Chicares, 2018/05/08