Check the Dates in a document

Hello, I need to check all the dates (day, date, month) in a document to a list of predetermined places (nearly 200 dates) to make sure that they are correct.

My plan is to search for the document using the following grep find...


(Monday |) Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday) \s (1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18: 19 | 20 | 21 | 22: 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31) \s(January| February | March | April | Can | June | July | August | September | October | November | December)

.. then check the text found against my fixture list, if its not found, it will display an alert.
Can someone tell me if there is a better way and where they would start the script in Applescript?
Thank you very much
LJ

Would it not easier to search on...

(Monday |) Tuesday | Wednesday | Thursday | Friday | Saturday | \S Sunday) [1-3]? \D\S(January| February | My UC | April | Can | June | July | August | September | October | November | December)

rather than list every 31 days? Same effect, I think, although certainly he will find thround 39 instead of 31...

Script-Wise, plan of Jong is good. The tables are called in As lists the skeleton of it would be something like this, I think:

tell application "Adobe InDesign CS3"
  tell active document
    display dialog "Find bad dates or clear bad dates color?" buttons {"Clear", "Find"} default button 2
    if button returned of result = "Find" then
      set badCount to 0
      set myGrepString to "(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)\\s[1-3]?\\d\\s(January|February|March|April|May|June|July|August|September|October|November|December)"
      set goodDateList to {"Monday 13 December", "Tuesday 15 February", "Monday 1 June"} --Fill with real ones
      try
        set mySwatch to make color with properties {name:"BAD DATES", model:spot, space:CMYK, color value:{0.0, 100.0, 0.0, 0.0}}
      end try
      tell application "Adobe InDesign CS3"
        set find grep preferences to nothing
        set change grep preferences to nothing
        set find what of find grep preferences to myGrepString
      end tell
      set foundList to find grep

      repeat with thisDate in foundList
        if goodDateList does not contain (thisDate as string) then
          set fill color of every character of thisDate to color "BAD DATES"
          set badCount to badCount + 1
        end if
      end repeat
      display dialog "Found "&badCount&" bad dates." buttons "OK" default button 1
    else
      try
        delete color "BAD DATES" replacing with color "Black"
      on error
        display dialog "Can't find BAD DATES color to delete."
      end try
    end if
  end tell
end tell

EDIT: Be sure to copy this script! Whenever I have copy out of the browser, December Gets a space inside and becomes December r...

Tags: InDesign

Similar Questions

  • Anyone know how to check the date of warranty until when?

    Anyone know how to check the date of warranty until when?

    https://checkcoverage.Apple.com/Jo/en/;JSESSIONID=9pJ0X9pFPJtNg3c44yDGCvk9pVpt5l QSgn4B60y4Skv1WfmnqMkF!-1840326800

  • I bought a latitude d530 use. It came with Windows 7. Site Web of Dell initially said vista wit came. It is no longer start. Error says check the data cable

    I bought a latitude d530 use. It came with Windows 7. Site Web of Dell initially said vista wit came. It is no longer start. Error says check the data cable. Sometimes, reinstall drive. I do not have the windows CD. Can I download the original Windows on android phone and the transfer

    You can download and create a bootable copy:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-windows_install?tab=question&status=unanswered

    then

    http://techingiteasy.WordPress.com/2012/04/13/how-to-activate-Windows-7-OEM-license-using-a-retail-disc/

  • How to check the data file is set to unlimilted autoextend

    S/N,

    Oracle version: 10.2.0.4
    OS: linux

    could someone tell me how can I check the data file are set to unlimited autoextend?

    Thank you
    Bahadur.

    Salvation;

    Pelase see:
    How to check the CanGrow data files the value of Maxsize unlimited [ID 468096.1]

    Respect of
    HELIOS

  • How to check the date valid?

    Hello

    I have a stored procedure that has a parameter of type varchar data entry. This parameter is actually a date, now I want to check whether this parameter is a valid date. My version of oracle's 10g. I tried ISDATE() built-in but my version of oracle does not support.

    Can ppl help please how?

    Concerning

    Frébault

    Hello Marie Lise.
    Here is the code example that you can do to check the Date. Create a function for this, hope this helps

    CREATE OR REPLACE FUNCTION F_DATE(v_date IN VARCHAR2) RETURN NUMBER IS
        v_date1 DATE;
    BEGIN
        select to_date(v_date) into v_date1 from dual;
            RETURN 1;
        Exception WHEN Others THEN
            RETURN 0;
    END;
    ----------------------------------------------
    SELECT F_DATE('01-JAN-09') FROM DUAL;
    -- Returns 1
    SELECT F_DATE('111111') FROM DUAL;
    -- Returns 0
    

    Please indicate if it helps you or correct
    Kind regards
    Danish

  • Check the date in the schema

    Hello

    I'm new on odi and I have to handle this scenario below

    I insert a date in the table at the end of a single package, in another package, I need to check whether this date is equal to the date system and then move to the second stage.

    I reached the date of insertion in the first package with ODI PROCEDURE below using

    Insert dates

    (Select to_char (sysdate, 'YYYY'), to_char (sysdate, 'mm'), to_char (sysdate, 'dd'), the double null);

    Can you please indicate how can I check the second step.

    You could use variable refresh and then check it out under estimate

    for example (in your case):

    Update the variable

    Select

    -case when to_char (sysdate, 'YYYY') + '-' + to_char (sysdate, 'mm') + '-' + to_char (sysdate, 'dd') = dates.year + '-'+ dates.month +' -' + dates.day, 1

    otherwise 0 end of dates where...

    On the second State handed this condition variable 1

    PS: why you store date in columns three tank?

    Maybe stored in formats or date format YYYYMMDD

  • How to check the date of last used database?

    We have a few databases are not used for a long time. How we can check the last date of use?

    I tried scn_to_timestamp (max (ora_rowscn)), does not, because scn_to_timestamp SNA must be not more than 5 days.
    I tried DBA_TAB_modifications, but we have not defined monitoring.

    Thank you very much

    SkyRiver

    How we can check the last date of use?

    If apps/user to connect through earpiece, you can look in the newspaper of the listener.

  • check the data

    Hi experts,

    using the jdeveloper 11.1.1.4.0 version and am using adf BC

    Here's my use case

    I had an af:table in the user interface. He had two fields (id1, id2).

    1 - the ID is a primary key.

    2 - the ID is not a primary key.

    some time, click on save button.

    I want to check the two fields with the same data. If the same data exist in two means of field. error should be thrown during the recording of the data.

    willingness to example in the photo what it is?

    ID1-(PK) | ID2

    Data1 | Data1 > error should be thrown during recording.

    Data2. datas > just accept to save it.

    in your dodMl of your entityImpl compares the two values... as

    public void doDML(operation){
    ...
    if(operation== DML_UPDATE){
    String value1= getAttribute("value1");
    String value2= getAttribute("value1");
    if(value1.equalIgnoreCase(value2)){
    throw new JBOException("Both the values are same");
    }
    }
    ...
    }
    
  • JavaScript to check the date of

    Hello

    I have a textbox, that changed with a Jquery datepicker. It is in the format 'DD-Mon-YYYY' format. I need to write a javacscript function to check if user, select the date if it is higher, then the system date must give a warning message and do not allow the user to select more then the date system.


    How it have created element with this name and the class name is give as class = AZ_DTP

    Select
    APEX_ITEM. TEXT (7, null, 10, 20, "readonly = yes)
    Class = onchange = javascript:checkdate () AZ_DTP')
    of the double


    Create a function like this

    function checkdate()
    {
    var myDate = new Date;
    If ($('.AZ_DTP') > myDate)
    {
    Alert (MyDate);
    }
    }


    Please suggest me how to modify the query. above


    Thank you
    Sudhir

    Just a thought: why not fix the limit under jQuery date picker settings 'Date Maximum?' You can specify the current date as the maximum incoming + 0d

    Always manually, users can enter a date later than the current date, but APEX automatically raises a validation error on presentation of the page with the message like "Date is greater than maximum specified day 24/03/2011.

  • What is the best way to check the data

    What is the best way to check the actual changes in the data, i.e., to be able to see each insert, update, delete on a given line, when it happened, who did it, and what looked like to the front row and after the change?

    Currently, we have implemented our own audit infrastructure where we generate standard triggers and an audit table to store the OLD (values at the beginning of the Timekeeping point row before) and NEW (values at the beginning of the point of timing after line) values for each change.

    I put this strategy due to the performance impact there (important say least) and because it's something that a developer (confession, I'm the developer) came with, rather than something is a database administrator came with. I looked in the audit of the Oracle, but it doesn't seem like we would be able to go back and see what a line looked like at some point in time. I also watched flashbacks, but this seems like it would take a monumental amount of storage just to be able to go back a week, much less the years currently keep us these data.

    Thank you
    Matt Knowles

    Published by: mattknowles on January 10, 2011 08:40

    mattknowles wrote:
    What is the best way to check the actual changes in the data, i.e., to be able to see each insert, update, delete on a given line, when it happened, who did it, and what looked like to the front row and after the change?

    Currently, we have implemented our own audit infrastructure where we generate standard triggers and an audit table to store the OLD (values at the beginning of the Timekeeping point row before) and NEW (values at the beginning of the point of timing after line) values for each change.

    You can either:
    1. set up your own audit custom (as you do now)
    2 flashback Data Archive (11 g). Application for licence.
    3 version check your tables with Workspace Manager.

    >

    I put this strategy due to the performance impact there (important say least) and because it's something that a developer (confession, I'm the developer) came with, rather than something is a database administrator came with. I looked in the audit of the Oracle, but it doesn't seem like we would be able to go back and see what a line looked like at some point in time. I also watched flashbacks, but this seems like it would take a monumental amount of storage just to be able to go back a week, much less the years currently keep us these data.

    Unfortunately, the audit of data always takes a lot of space. You should also consider the performance, as custom triggers and Workspace Manager will perform much slower than the FDA if there is heavy DML on the table.

  • Check the data vacuum in EditField.

    Hello

    I created several EditField for gethering address as address, city, State and zip code.

    I want to give an alert without moving the following field if user big fill the field.

    Is there anyway for this feature?

    Thank you

    DK.

    I suggest that you override onUnfocus() to do this.

    Unfortunately this does not stop anyone 'submit' immediately without going through your protected fields, so I've never bothered with it.  It is also incredibly annoying if you really want to fill the screen in a different order, they are displayed.  Instead, I check the 'not empty' as part of the submission process.  But that's just me...

  • Check the data before inserting

    Hi all

    Appreciate your help. I have 3 tables, see below

    Examples of data

    CREATE TABLE PARENT_1

    (PARENT1_PK_COL NUMBER 4

    ) ;

    ALTER TABLE PARENT_1 ADD PRIMARY KEY

    (

    PARENT1_PK_COL

    )

    ;

    /

    CREATE TABLE PARENT_2

    (PARENT2_PK_COL NUMBER 4, NUMBER 4 PARENT2_FK_COL

    ) ;

    /

    ALTER TABLE PARENT_2 ADD PRIMARY KEY

    (

    PARENT2_PK_COL

    )

    ;

    /

    ALTER TABLE PARENT_2 ADD CONSTRAINT FOREIGN KEY ABC

    (

    PARENT2_FK_COL

    )

    REFERENCES PARENT_1

    (

    PARENT1_PK_COL

    )

    ;

    /

    CREATE TABLE CHILD_1

    (CHILD_1_PK NUMBER 4

    ) ;

    ALTER TABLE CHILD_1 ADD PRIMARY KEY

    (

    CHILD_1_PK

    )

    ;

    /

    My question is that before the insertion of data in the child_1 table, oracle look in parent_1.PARENT1_PK_COL and parent_2.PARENT2_PK_COL and columns if the data exists in both table then it allows to insert the record in the child_1 table, how do I apply this logic? do I need to add another foreign key in the child_1 table that references the two table? Please guide. Thank you

    Concerning

    MIT


    I got the answer, please ignore this thread

  • Check the date of receipt of claims and GL

    Dear all,

    We use ORACLE EBS R12.1.2.

    For business needs we need to prevent users to enter the date of receipt of the payment and the date of GL.

    We managed to do customization to turn off two fields. But is there any option of profile system to prevent this. (In the inventory module, you can use the profile INV option: Validation of Transaction Date to control some date fields in this module). Is there something like that on loans?

    Thanks in advance,

    Shareef

    Thanks Manish, I can understand that there is no profile option or any other option of system to control that. is that correct?

  • Check the Date

    Hi,

    My_table
    COL_A | COL_b
    1     | 07/01/2012
    2     | 01/02/2012
    3     | 10/02/2012  <-- WRONG
    4     | 08/02/2012
    5     | 18/03/2012
    6     | 20/03/2012
    7     | 16/02/2012  <-- WRONG
    8     | 07/05/2012
    9     | 10/05/2012

    The dates are obligatory and they are arranged in the cronological order.
    Is it possible to verify which ones are not in order with the help of only one sql?

    Regards

    Jomar
                       

    Hi, Jomar,

    Jomar says:

    Hi,
    
    My_tableCOL_A | COL_b1     | 07/01/20122     | 01/02/20123     | 10/02/2012  <-- WRONG4     | 08/02/2012
    

    Why do you say this and not

    COL_A   COL_B
    3       10/02/2012
    4       08/02/2012     <-- WRONG
    

    ?

    5     | 18/03/20126     | 20/03/20127     | 16/02/2012  <-- WRONG8     | 07/05/20129     | 10/05/2012
    
    The dates are obligatory and they are arranged in the cronological order.Is it possible to verify which ones are not in order with the help of only one sql?
    

    Can you tell which ones is not in order? Describe exactly why you want the results do you and not some others (such as those that I asked above), and someone will help you to get them.

    Regards
    
    Jomar
    

    Assuming col_b is a DATE, you can do something like this:

    SELECT       col_a
    ,       col_b
    ,       CASE
               WHEN  col_b < LAG  (col_b) OVER (ORDER BY  col_a)
                 OR  col_b > LEAD (col_b) OVER (ORDER BY  col_a)
               THEN  '<-- Could be wrong'
           END             AS flag
    FROM       my_table
    ORDER BY  col_a
    ;
    

    I hope that answers your question.
    If not, what exactly is your question? What exactly are you trying to do? You want to change a single column (or the other), such as two columns of follow the same order? It's actually easier to identify which lines are out of use.
    Post a small example data (CREATE TABLE and only relevant columns, INSERT statements), and the results you want from this data.
    In the case of a DML (UPDATE), for example, the sample data should show what looks like the tables before the DML, and the results will be the content of the or the tables changed after the DML.
    Explain, using specific examples, how you get these results from these data.
    Always tell what version of Oracle you are using.
    See the FAQ forum {message identifier: = 9360002}

  • Check the Date Format

    Helllo,
    I have a form with an element selector to date on this subject. If the user does not use the date picker and inserts the date / time text, I must be able to verify that the user
    entered date / time in the correct format. Is it possible in the apex to validate the format of the date / time is entered, short of creating a validation function that parses the date / hour in the month, day, year, hour, minutes and AM/PM? Any help would be greatly appreciated.

    Sharon

    Hello Sharon,

    The following reference should explain this more in detail;

    http://www.psoug.org/reference/RegExp.html

    see you soon,

    Ron

Maybe you are looking for

  • Formula for the due invoice weekends out of date

    HI - I want to be able to follow when a Bill is due. I have a column of dates have charged customers but I want to work when the 30 days is up off weekends. I would also like it show when it is received, and if it is still ongoing when I change the b

  • MAX does not see the cards as DAQmx

    I have three cards OR in my machine: PCI-6602, 6120-PCI and PCI-MIO-16-4 (aka PCI-6040E).  For some reason any my measurement & automation explore (MAX) does not see them I expect.  He sees the card PCI - MIO in the DAQmx and NOR-traditional DAQ reco

  • is it better to use functions instead of objects? things get very complicated

    My App is trying to apply the method of Muller. I have about six classes. It appears to be too complicated to cope. Should I go back to the use of functions? (maybe two classes). I have to start over.

  • What is the difference betweet malware, spyware and viruis

    I do not know what is the difference between malaware and spyware are all viruses or what?.Once again, I am new to the community and have restored an edition xps dell dimension 4700 family its been a learning process. Thanks again,SincerelyGina Davis

  • Movie Maker problem: music stops and the screen goes black

    Have loaded slides and music for Windows Live Movie Maker and I'm reviewing before creating the movie.  At one point, the music stops playing, but still slides.  If I stop and move the cursor over a photo and continue to play... no music will play an