| Michigan Date Conversion |
Path:
APIS
: APIS
Documentation : Metadata
: Michigan Conversion
|
FileMakerPro Scripts (Field Calculations) Used to Create
Normalized Date Fields from Michigan APIS Records
An attempt was made to extract normalized dates (corresponding to the
USMARC "Date1" and "Date2" elements) from the narrative textual
Michigan "Date" field. This was attemped for individual AD/BC dates
and spans of AD/BC dates as well as century type date references
(e.g., Late IIIrd/early IVth cent.). The beginning and ending normalized
dates derived from the century references were done based on lay
understanding only and should probably be reviewed by Dr. Bagnall.
Those dates which included month, day, and year elements were not
able to be addressed programmatically because of time constraints
and the limited tools available within the FileMaker Pro context.
Instead, the year element of these dates was manually rekeyed into
cuDate1 or cuDate2 as appropriate. If the Michigan records are updated
and reconverted at some point in the future, these should either
be programmatically addressed or else manually supplied in the Michigan
records.
|
1. AD Date1: century references
If(
(Position(Date,"A.D.",1,1) > 0 or Position(Date,"A. D.",1,1) > 0 or Position(Date,"AD",1,1) > 0) and (Position(Date, "B.C.",1,1) = 0),
"cuDate1 | 1 | " &
Case(
Position(Upper(Date),Upper("1st half of the Ist cent."),1,1) = 1,"1",
Position(Upper(Date),Upper("first half of the Ist cent."),1,1) = 1,"1",
Position(Upper(Date),Upper("Late Ist"),1,1) = 1,"75",
Position(Upper(Date),Upper("Ist cent. B.C./early Ist cent. A.D."),1,1),"",
Position(Upper(Date),Upper("early Ist cent."),1,1) = 1,"1",
Position(Upper(Date),Upper("Ist cent."),1,1) = 1,"1",
Position(Upper(Date),Upper("Ist or IInd cent."),1,1) = 1,"1",
Position(Upper(Date),Upper("Ist-beginning of IInd cent."),1,1),"1",
Position(Upper(Date),Upper("Ist-IInd cent."),1,1),"1",
Position(Upper(Date),Upper("Ist/IInd cent."),1,1),"1",
Position(Upper(Date),Upper("Middle IInd"),1,1),"150",
Position(Upper(Date),Upper("Late IInd Cent."),1,1),"175",
Position(Upper(Date),Upper("1st half of the IInd cent."),1,1),"100",
Position(Upper(Date),Upper("2nd half of IInd cent."),1,1),"150",
Position(Upper(Date),Upper("Early IInd Cent."),1,1),"100",
Position(Upper(Date),Upper("(Early) IInd Cent."),1,1),"100",
Position(Upper(Date),Upper("Late IInd or early IIIrd cent."),1,1),"175",
Position(Upper(Date),Upper("Late IInd/early IIIrd cent."),1,1),"175",
Position(Upper(Date),Upper("IInd/IIIrd cent."),1,1),"100",
Position(Upper(Date),Upper("IInd/IIIrd. cent."),1,1),"100",
Position(Upper(Date),Upper("IInd-IIIrd cent."),1,1),"100",
Position(Upper(Date),Upper("IInd or IIIrd cent."),1,1),"100",
Position(Upper(Date),Upper("IInd or early IIIrd cent."),1,1),"100",
Position(Upper(Date),Upper("2nd half of the IInd cent."),1,1),"150",
Position(Upper(Date),Upper("Latter half of IInd cent."),1,1),"150",
Position(Upper(Date),Upper("IInd Cent."),1,1),"100",
Position(Upper(Date),Upper("Late IIIrd/IVth cent."),1,1),"275",
Position(Upper(Date),Upper("Late IIIrd or early IVth cent."),1,1),"275",
Position(Upper(Date),Upper("Late IIIrd/early IVth cent."),1,1),"275",
Position(Upper(Date),Upper("Late IIIrd cent."),1,1),"275",
Position(Upper(Date),Upper("Middle IIIrd"),1,1),"250",
Position(Upper(Date),Upper("IIIrd cent."),1,1),"200",
Position(Upper(Date),Upper("(Early) IIIrd cent."),1,1),"200",
Position(Upper(Date),Upper("IIIrd/IVth cent."),1,1),"200",
Position(Upper(Date),Upper("IIIrd-IVth cent."),1,1),"200",
Position(Upper(Date),Upper("IIIrd or IVth Cent."),1,1),"200",
Position(Upper(Date),Upper("IIIrd/early IVth Cent."),1,1),"200",
Position(Upper(Date),Upper("IVth to VIth Cent."),1,1),"300",
Position(Upper(Date),Upper("Late IVth"),1,1),"375",
Position(Upper(Date),Upper("Late IVth/Vth cent."),1,1),"375",
Position(Upper(Date),Upper("IVth/Vth cent."),1,1),"300",
Position(Upper(Date),Upper("IVth cent."),1,1) = 1,"300",
Position(Upper(Date),Upper("Late Vth Cent."),1,1),"475",
Position(Upper(Date),Upper("Vth-VIth Cent."),1,1),"400",
Position(Upper(Date),Upper("Vth or VIth Cent."),1,1),"400",
Position(Upper(Date),Upper("Vth Cent."),1,1),"400",
Position(Upper(Date),Upper("VIth cent."),1,1),"500",
Position(Upper(Date),Upper("Early 6th cent."),1,1),"500",
Position(Upper(Date),Upper("VIth/VIIth cent."),1,1),"500",
Position(Upper(Date),Upper("VIIth cent."),1,1),"600",
Position(Upper(Date),Upper("VIIth/VIIIth cent."),1,1),"600",
Position(Upper(Date),Upper("7th or 8th Cent."),1,1),"600"),
"")
============================================================
2. AD Date 1: Single numeric dates
If(Position(Date,"1",1,1) = 1 or Position(Date,"2",1,1) = 1 or Position(Date,"3",1,1) = 1
or Position(Date,"4",1,1) = 1 or Position(Date,"5",1,1) = 1 or Position(Date,"4",1,1) = 1 or Position(Date,"6",1,1) = 1 or Position(Date,"7",1,1) = 1 or Position(Date,"8",1,1) = 1 or Position(Date,"9",1,1) = 1 or Position(Date,"0",1,1) = 1,
Case(
Position(Date,"A.D.",1,1) = 4, "cuDate1 | 1 | " & Trim(Left(Date,3)),
Position(Date,"AD",1,1) = 4, "cuDate1 | 1 | " & Trim(Left(Date,3)),
Position(Date,"A. D.",1,1) = 4, "cuDate1 | 1 | " & Trim(Left(Date,3)),
Position(Date,"A.D.",1,1) = 5, "cuDate1 | 1 | " & Trim(Left(Date,4)),
Position(Date,"AD",1,1) = 5, "cuDate1 | 1 | " & Trim(Left(Date,4)),
Position(Date,"A. D.",1,1) = 5, "cuDate1 | 1 | " & Trim(Left(Date,4))
), "")
============================================================
3. AD Date 1: Numeric date spans
Case((Position(Date,"A.D.",1,1) > 0 or Position(Date,"AD",1,1) > 0 or Position(Date,"A. D.",1,1) > 0) and
(Position(Date,"1",1,1) = 1 or Position(Date, "2",1,1) = 1 or Position(Date,"2",1,1) = 1 or Position(Date,"3",1,1) = 1 or Position(Date,"4",1,1) = 1 or Position(Date,"5",1,1) = 1 or Position(Date,"6",1,1) =1 or Position(Date,"7",1,1) = 1 or Position(Date,"8",1,1) = 1 or Position(Date, "9",1,1) = 1),
Case(
Position(Date,"-",1,1) = 3, "cuDate1 | 1 | " & Trim(Left(Date,2)),
Position(Date,"/",1,1) = 3, "cuDate1 | 1 | " & Trim(Left(Date,2)),
Position(Date,"or",1,1) = 3, "cuDate1 | 1 | " & Trim(Left(Date,2)),
Position(Date,"-",1,1) = 4, "cuDate1 | 1 | " & Trim(Left(Date,3)),
Position(Date,"/",1,1) = 4, "cuDate1 | 1 | " & Trim(Left(Date,3)),
Position(Date,"or",1,1) = 4, "cuDate1 | 1 | " & Trim(Left(Date,3)),
Position(Date,"-",1,1) = 5, "cuDate1 | 1 | " & Trim(Left(Date,4)),
Position(Date,"/",1,1) = 5, "cuDate1 | 1 | " & Trim(Left(Date,4)),
Position(Date,"or",1,1) = 5, "cuDate1 | 1 | " & Trim(Left(Date,4))
))
============================================================
4. BC Date 1: Century references
If(
Position(Date,"B.C.",1,1) > 0 or Position(Date,"B. C.",1,1) > 0 or Position(Date,"BC",1,1) > 0, "cuDate1 | 1 | " &
Case(
Position(Upper(Date),Upper("Late Ist cent. B.C./early Ist cent."),1,1) = 1,"-25",
Position(Upper(Date),Upper("IInd or Ist cent."),1,1),"-199",
Position(Upper(Date),Upper("IInd/Ist cent."),1,1),"-199",
Position(Upper(Date),Upper("Ist cent."),1,1) = 1,"-99",
Position(Upper(Date),Upper("IIIrd/IInd cent."),1,1),"-299",
Position(Upper(Date),Upper("IInd Cent."),1,1),"-199",
Position(Upper(Date),Upper("IInd Cent."),1,1),"-199",
Position(Upper(Date),Upper("1st half of the IInd cent."),1,1),"-199",
Position(Upper(Date),Upper("Early IInd Cent."),1,1),"-199",
Position(Upper(Date),Upper("(Early) IInd Cent."),1,1),"-199",
Position(Upper(Date),Upper("2nd half of the IInd cent."),1,1),"-150",
Position(Upper(Date),Upper("Latter half of IInd cent."),1,1),"-150",
Position(Upper(Date),Upper("IIIrd cent."),1,1),"-299",
Position(Upper(Date),Upper("IIIrd/IInd cent. B.C."),1,1),"-299",
Position(Upper(Date),Upper("(Early) IIIrd cent."),1,1),"-299",
Position(Upper(Date),Upper("IIIrd/IVth cent."),1,1),"-200",
Position(Upper(Date),Upper("IIIrd or IVth Cent."),1,1),"-399",
Position(Upper(Date),Upper("IVth cent."),1,1),"-399",
Position(Upper(Date),Upper("Vth Cent."),1,1),"-499"),
"")
============================================================
5. BC Date 1: Numeric Date Spans
Case(
Position(Date,"B.C.",1,1) = 4, "cuDate1 | 1 | -" & Trim(Left(Date,3)),
Position(Date,"BC",1,1) = 4, "cuDate1 | 1 | -" & Trim(Left(Date,3)),
Position(Date,"B. C.",1,1) = 4, "cuDate1 | 1 | - " & Trim(Left(Date,3)),
Position(Date,"B.C.",1,1) = 5, "cuDate1 | 1 | - " & Trim(Left(Date,4)),
Position(Date,"BC",1,1) = 5, "cuDate1 | 1 | -" & Trim(Left(Date,4)),
Position(Date,"B. C.",1,1) = 5, "cuDate1 | 1 | -" & Trim(Left(Date,4)),
Position(Date,"B.C.",1,1) > 0 and Position(Date,"-",1,1) = 3, "cuDate1 | 1 | -" & Trim(Left(Date,2)),
Position(Date,"BC",1,1) > 0 and Position(Date,"-",1,1) = 3, "cuDate1 | 1 | -" & Trim(Left(Date,2)),
Position(Date,"B. C.",1,1) > 0 and Position(Date,"-",1,1) = 3, "cuDate1 | 1 | -" & Trim(Left(Date,2)),
Position(Date,"B.C.",1,1) > 0 and Position(Date,"/",1,1) = 3, "cuDate1 | 1 | -" & Trim(Left(Date,2)),
Position(Date,"BC",1,1) > 0 and Position(Date,"/",1,1) = 3, "cuDate1 | 1 | -" & Trim(Left(Date,2)),
Position(Date,"B. C.",1,1) > 0 and Position(Date,"/",1,1) = 3, "cuDate1 | 1 | -" & Trim(Left(Date,2)),
Position(Date,"B.C.",1,1) > 0 and Position(Date,"or",1,1) = 3, "cuDate1 | 1 | -" & Trim(Left(Date,2)),
Position(Date,"BC",1,1) > 0 and Position(Date,"or",1,1) = 3, "cuDate1 | 1 | -" & Trim(Left(Date,2)),
Position(Date,"B. C.",1,1) > 0 and Position(Date,"or",1,1) = 3, "cuDate1 | 1 | -" & Trim(Left(Date,2)),
Position(Date,"B.C.",1,1) > 0 and Position(Date,"-",1,1) = 4, "cuDate1 | 1 | -" & Trim(Left(Date,3)),
Position(Date,"BC",1,1) > 0 and Position(Date,"-",1,1) = 4, "cuDate1 | 1 | -" & Trim(Left(Date,3)),
Position(Date,"B. C.",1,1) > 0 and Position(Date,"-",1,1) = 4, "cuDate1 | 1 | -" & Trim(Left(Date,3)),
Position(Date,"B.C.",1,1) > 0 and Position(Date,"/",1,1) = 4, "cuDate1 | 1 | -" & Trim(Left(Date,3)),
Position(Date,"BC",1,1) > 0 and Position(Date,"/",1,1) = 4, "cuDate1 | 1 | -" & Trim(Left(Date,3)),
Position(Date,"B. C.",1,1) > 0 and Position(Date,"/",1,1) = 4, "cuDate1 | 1 | -" & Trim(Left(Date,3)),
Position(Date,"B.C.",1,1) > 0 and Position(Date,"or",1,1) = 4, "cuDate1 | 1 | -" & Trim(Left(Date,3)),
Position(Date,"BC",1,1) > 0 and Position(Date,"or",1,1) = 4, "cuDate1 | 1 | -" & Trim(Left(Date,3)),
Position(Date,"B. C.",1,1) > 0 and Position(Date,"or",1,1) = 4, "cuDate1 | 1 | -" & Trim(Left(Date,3)),
Position(Date,"B.C.",1,1) > 0 and Position(Date,"or",1,1) = 5, "cuDate1 | 1 | -" & Trim(Left(Date,4)),
Position(Date,"BC",1,1) > 0 and Position(Date,"or",1,1) = 5, "cuDate1 | 1 | -" & Trim(Left(Date,4)),
Position(Date,"B. C.",1,1) > 0 and Position(Date,"or",1,1) = 5, "cuDate1 | 1 | -" & Trim(Left(Date,4))
)
============================================================
7. AD Date2: Century References
If(
(Position(Date,"A.D.",1,1) > 0 or Position(Date,"A. D.",1,1) > 0 or Position(Date,"AD",1,1) > 0) and (Position(Date, "B.C.",1,1) = 0),
"cuDate2 | 1 | " &
Case(
Position(Upper(Date),Upper("first half of the Ist cent."),1,1) = 1,"50",
Position(Upper(Date),Upper("1st half of the Ist cent."),1,1) = 1,"50",
Position(Upper(Date),Upper("Late Ist"),1,1) = 1,"99",
Position(Upper(Date),Upper("Ist cent. B.C./early Ist cent. A.D."),1,1),"25",
Position(Upper(Date),Upper("early Ist cent."),1,1) = 1,"25",
Position(Upper(Date),Upper("Ist cent."),1,1) = 1,"99",
Position(Upper(Date),Upper("Ist or IInd cent."),1,1) = 1,"199",
Position(Upper(Date),Upper("Ist-beginning of IInd cent."),1,1),"125",
Position(Upper(Date),Upper("Ist-IInd cent."),1,1),"199",
Position(Upper(Date),Upper("Ist/IInd cent."),1,1),"199",
Position(Upper(Date),Upper("Middle IInd"),1,1),"175",
Position(Upper(Date),Upper("Late IInd Cent."),1,1),"199",
Position(Upper(Date),Upper("first half of the IInd cent."),1,1),"150",
Position(Upper(Date),Upper("1st half of the IInd cent."),1,1),"150",
Position(Upper(Date),Upper("Early IInd Cent."),1,1),"125",
Position(Upper(Date),Upper("(Early) IInd Cent."),1,1),"125",
Position(Upper(Date),Upper("Late IInd or early IIIrd cent."),1,1),"225",
Position(Upper(Date),Upper("Late IInd/early IIIrd cent."),1,1),"225",
Position(Upper(Date),Upper("IInd Cent."),1,1),"199",
Position(Upper(Date),Upper("IInd/IIIrd cent."),1,1),"299",
Position(Upper(Date),Upper("IInd/IIIrd. cent."),1,1),"299",
Position(Upper(Date),Upper("IInd-IIIrd cent."),1,1),"299",
Position(Upper(Date),Upper("IInd or IIIrd cent."),1,1),"299",
Position(Upper(Date),Upper("IInd or early IIIrd cent."),1,1),"225",
Position(Upper(Date),Upper("2nd half of the IInd cent."),1,1),"199",
Position(Upper(Date),Upper("Latter half of IInd cent."),1,1),"199",
Position(Upper(Date),Upper("first half of the IIIrd cent."),1,1),"250",
Position(Upper(Date),Upper("Late IIIrd/IVth cent."),1,1),"399",
Position(Upper(Date),Upper("Late IIIrd or early IVth cent."),1,1),"325",
Position(Upper(Date),Upper("Late IIIrd/early IVth cent."),1,1),"325",
Position(Upper(Date),Upper("Late IIIrd cent."),1,1),"299",
Position(Upper(Date),Upper("Early IIIrd cent."),1,1),"225",
Position(Upper(Date),Upper("(Early) IIIrd cent."),1,1),"225",
Position(Upper(Date),Upper("IIIrd/IVth cent."),1,1),"399",
Position(Upper(Date),Upper("IIIrd-IVth cent."),1,1),"399",
Position(Upper(Date),Upper("IIIrd or IVth Cent."),1,1),"399",
Position(Upper(Date),Upper("IIIrd cent."),1,1),"299",
Position(Upper(Date),Upper("IVth to VIth Cent"),1,1),"599",
Position(Upper(Date),Upper("First half of IVth"),1,1),"350",
Position(Upper(Date),Upper("First half of the IVth"),1,1),"350",
Position(Upper(Date),Upper("Late IVth/Vth cent."),1,1),"499",
Position(Upper(Date),Upper("Late IVth"),1,1),"399",
Position(Upper(Date),Upper("Early IVth"),1,1),"325",
Position(Upper(Date),Upper("Late IVth/Vth cent."),1,1),"499",
Position(Upper(Date),Upper("IVth/Vth cent."),1,1),"499",
Position(Upper(Date),Upper("IVth cent."),1,1)=1,"399",
Position(Upper(Date),Upper("Vth-VIth Cent."),1,1),"599",
Position(Upper(Date),Upper("Late Vth Cent."),1,1),"499",
Position(Upper(Date),Upper("Early Vth Cent."),1,1),"425",
Position(Upper(Date),Upper("Vth Cent."),1,1),"499",
Position(Upper(Date),Upper("First half of Vth Cent."),1,1),"450",
Position(Upper(Date),Upper("First half of VIth cent."),1,1),"550",
Position(Upper(Date),Upper("VIth cent."),1,1),"599",
Position(Upper(Date),Upper("Early 6th cent."),1,1),"525",
Position(Upper(Date),Upper("VIth/VIIth cent."),1,1),"699",
Position(Upper(Date),Upper("VIIth cent."),1,1),"699",
Position(Upper(Date),Upper("VIIth/VIIIth cent."),1,1),"799",
Position(Upper(Date),Upper("7th or 8th Cent."),1,1),"799"),
"")
============================================================
8. BC Date2: Century References
If(
Position(Date,"B.C.",1,1) > 0 or Position(Date,"B. C.",1,1) > 0 or Position(Date,"BC",1,1) > 0, "cuDate2 | 1 | " &
Case(
Position(Upper(Date),Upper("Ist cent. B.C./Ist cent."),1,1),"99",
Position(Upper(Date),Upper("Ist cent. B.C./early Ist cent."),1,1),"25",
Position(Upper(Date),Upper("Late Ist cent. B.C./early Ist cent."),1,1) = 1,"25",
Position(Upper(Date),Upper("IInd or Ist cent."),1,1),"-1",
Position(Upper(Date),Upper("IInd/Ist cent."),1,1),"-1",
Position(Upper(Date),Upper("Ist cent."),1,1) = 1,"-1",
Position(Upper(Date),Upper("IInd Cent."),1,1),"-100",
Position(Upper(Date),Upper("1st half of the IInd cent."),1,1),"-150",
Position(Upper(Date),Upper("Early IInd Cent."),1,1),"-175",
Position(Upper(Date),Upper("(Early) IInd Cent."),1,1),"-175",
Position(Upper(Date),Upper("IInd/IIIrd cent."),1,1),"-100",
Position(Upper(Date),Upper("2nd half of the IInd cent."),1,1),"-100",
Position(Upper(Date),Upper("Latter half of IInd cent."),1,1),"-100",
Position(Upper(Date),Upper("IIIrd cent."),1,1),"-200",
Position(Upper(Date),Upper("IIIrd/IInd cent. B.C."),1,1),"-200",
Position(Upper(Date),Upper("(Early) IIIrd cent."),1,1),"-275",
Position(Upper(Date),Upper("IIIrd/IVth cent."),1,1),"-200",
Position(Upper(Date),Upper("IIIrd or IVth Cent."),1,1),"-200",
Position(Upper(Date),Upper("IVth cent."),1,1),"-300",
Position(Upper(Date),Upper("Vth Cent."),1,1),"-400"),
"")
|