Home Subjects Archives Quotations Forums
 Top 100 •  The Book •  Contact A Web site by Paul McFedries   


WORDS ABOUT WORDS
Wisdom comes in 10 parts, 9 of which are silence. The tenth is brevity of language.
—Proverbs

Posted on April 10, 2003 at 4:15 PM


Function FormatDate(d) If Month(d) = 1 Then s = "January" If Month(d) = 2 Then s = "February" If Month(d) = 3 Then s = "March" If Month(d) = 4 Then s = "April" If Month(d) = 5 Then s = "May" If Month(d) = 6 Then s = "June" If Month(d) = 7 Then s = "July" If Month(d) = 8 Then s = "August" If Month(d) = 9 Then s = "September" If Month(d) = 10 Then s = "October" If Month(d) = 11 Then s = "November" If Month(d) = 12 Then s = "December" s = s & " " & Day(d) & ", " & Year(d) FormatDate = s End Function Function FormatTime(d) If Hour(d) = 0 Then s = "12" ElseIf Hour(d) > 0 And Hour(d) <= 12 Then s = Hour(d) Else s = Hour(d) - 12 End If If Minute(d) < 10 Then s = s & ":0" & Minute(d) Else s = s & ":" & Minute(d) End If If Hour(d) <=12 Then s = s & " AM" Else s = s & " PM" End If FormatTime = s End Function Function RemoveSpaces(sOriginalWord) sWord = sOriginalWord If Left(sWord, 1) = "-" Then sWord = Right(sWord, Len(sWord) - 1) End If Do While InStr(sWord, " ") <> 0 spacePos = InStr(sWord, " ") If spacePos <> 0 Then sWord = Left(sWord, spacePos - 1) & Right(sWord, Len(sWord) - spacePos) End If Loop Do While InStr(sWord, "/") <> 0 spacePos = InStr(sWord, "/") If spacePos <> 0 Then sWord = Left(sWord, spacePos - 1) & "-" & Right(sWord, Len(sWord) - spacePos) End If Loop Do While InStr(sWord, "'") <> 0 spacePos = InStr(sWord, "'") If spacePos <> 0 Then sWord = Left(sWord, spacePos - 1) & Right(sWord, Len(sWord) - spacePos) End If Loop RemoveSpaces = sWord End Function Function ReplaceSingleQuotesWithHTMLCode(sOriginalText) str = sOriginalText Do While InStr(str, "'") <> 0 quotePos = InStr(str, "'") If quotePos <> 0 Then str = Left(str, quotePos - 1) & "'" & Right(str, Len(str) - quotePos) End If Loop ReplaceSingleQuotesWithHTMLCode = str End Function Function ReplaceAllQuotesWithHTMLCode(sOriginalText) str = sOriginalText Do While InStr(str, "'") <> 0 quotePos = InStr(str, "'") If quotePos <> 0 Then str = Left(str, quotePos - 1) & "'" & Right(str, Len(str) - quotePos) End If Loop Do While InStr(str, """") <> 0 quotePos = InStr(str, """") If quotePos <> 0 Then str = Left(str, quotePos - 1) & """ & Right(str, Len(str) - quotePos) End If Loop ReplaceAllQuotesWithHTMLCode = str End Function Function ReplaceString(strField, strFind, strReplace) findLocation = InStr(strField, strFind) Do While findLocation <> 0 If findLocation = 1 Then leftField = "" Else leftField = Left(strField, findLocation - 1) End If rightfield = Right(strField, Len(strField) - findLocation - (Len(strFind) - 1)) strField = leftField & strReplace & rightfield findLocation = InStr(findLocation + Len(strFind) + 3, strField, strFind) Loop ReplaceString = strField End Function
 Words About Words:
Quotations Index

Author Index

 Recent posts:
  returnment
  tipping element
  "mug me" earphones
  renoviction
  philanthrocapitalism
  reverse Bradley effect
  silent run
  myco-diesel
  punditariat
  liquor-cycle
 Select an archive:
  A B C D E F G H I
  J K L M N O P Q R
  S T U V W X Y Z #
 Other links:
Word Spy Citations

My Favorite Words

My Neologisms

 Search Word Spy:

Enter your search text:

 Subscribe to Word Spy:
Get Word Spy by RSS


Get Word Spy by email:


Powered by FeedBlitz



Word Spy on Twitter
 Lingua Techna Posts:



Copyright © 1995 - 2013 Paul McFedries and Logophilia Limited