# Bug Tracker

ID: 122 🔗 Closed (Fixed) datetime2 1.5.2 Vincent Danjean 2017-02-23 06:37:27 spurious spaces in \DTMsetregional

## Report

Hi,

I'm using the \DTMsetregional macro in a document to switch between numerical and text form (in French). However, each time this macro is used, two spaces are inserted. One come from the \DTMsetregional macro itself, the other from the \datefrench macro (called from \DTMsetregional in my setup).

The following patches fix the two issues:

diff --git a/datetime2.dtx b/datetime2.dtx
index 569cd0b..cbf063f 100644
--- a/datetime2.dtx
+++ b/datetime2.dtx
@@ -7374,7 +7374,7 @@
{%
\ifcsdef{date\languagename}
{%
-      \csuse{date\languagename}
+      \csuse{date\languagename}%
}%
{%
%    \end{macrocode}

diff --git a/datetime2-french.dtx b/datetime2-french.dtx
index 96f0075..6dd2804 100644
--- a/datetime2-french.dtx
+++ b/datetime2-french.dtx
@@ -726,7 +726,7 @@
\DTMifcaseregional
{}% do nothing
{\DTMsetstyle{french}}%
-    {\DTMsetstyle{french-numeric}}
+    {\DTMsetstyle{french-numeric}}%
}%
}%
%    \end{macrocode}

And here is a minimal doc to test:
\documentclass[french]{article}

\usepackage{babel}
\usepackage{datetime2}

\begin{document}

a\DTMsetregional[text]b\DTMdate{2016-12-12}c

\end{document}

The 'a' and 'b' letter should be nearby. Without the patches, two spaces are inserted.

Regards,
Vincent

### MWE

\documentclass[french]{article}

\usepackage{babel}
\usepackage{datetime2}

\begin{document}

a\DTMsetregional[text]b\DTMdate{2016-12-12}c

\end{document}


## Evaluation

The spurious space in \DTMsetregional has now been fixed in v1.5.6 (2020-03-02), so this I'm closing this bug report as fixed. The other issue isn't a bug in datetime2 but is a bug in a separately maintained regional module and so isn't covered by this bug tracker.

The problem with datetime2-french.ldf needs to be fixed by the maintainer of the datetime2-french. I have sent a notification to all maintainers of the regional datetime2 modules about the spurious space problem.

## Watch This Report

If you supply your name, it will be used in the email greeting, which provides a more personal message, otherwise you'll just get a generic greeting. If you have previously supplied your name when signing up for notifications, you don't need to resupply it unless you want to change it.

If you have previously subscribed to notifications for this report, you can unsubscribe by clicking on the "Stop Notification" button.

The "Confirm Bug ID" field helps to protect against spambots. Please enter the bug ID (which you can find at the top of this page).

Name: (Optional.)