Skyfall

***Skyfall*** is a 2012 spy film and the twenty-third in the *James Bond* series produced by Eon Productions. The film is the third to star Daniel Craig as fictional MI6 agent James Bond and features Javier Bardem as Raoul Silva, the villain, and Judi Dench as M. It was directed by Sam Mendes and written by Neal Purvis, Robert Wade, and John Logan and features the theme song "Skyfall", co-written and performed by Adele. It was theatrically distributed by Sony Pictures Releasing. The story centres on Bond investigating an attack on MI6 that leads to a wider plot by former agent Raoul Silva to discredit and kill M as revenge for abandoning him. It sees the return of two recurring characters after an absence of two films: Q, now played by Ben Whishaw, and Miss Moneypenny, now played by Naomie Harris.

Mendes was approached to direct after the release of *Quantum of Solace* in 2008. Development was suspended when MGM ran into financial trouble, and did not resume until MGM emerged from bankruptcy in December 2010; meanwhile the original screenwriter, Peter Morgan, left the project. When production resumed, Logan, Purvis, and Wade continued writing what became the final version. Filming began in November 2011, primarily in the United Kingdom, with smaller portions shot in China and Turkey.

*Skyfall* premiered at the Royal Albert Hall, London, on 23 October 2012 and was released in the UK on 26 October and in North America on 9 November. It was the first James Bond film to be screened in IMAX venues, although it was not filmed with IMAX cameras. The release coincided with the 50th anniversary of the series, which began with *Dr. No* in 1962. *Skyfall* won several accolades, including two Academy Awards, two BAFTA Awards, and two Grammy Awards. It received highly positive reviews from critics for Mendes's direction, the performances (particularly from Craig, Bardem, and Dench), action scenes, cinematography, and musical score. It was the fourteenth film to gross over $1 billion worldwide, and the only *James Bond* film to do so. It became the seventh-highest-grossing film of all time, the highest-grossing film in the UK, the highest-grossing film in the series, the highest-grossing film worldwide for both Sony Pictures and MGM, and the second-highest-grossing film of 2012.

The next film in the series, *Spectre*, was released in the US and Canada in November 2015, with Craig reprising his role, Sony Pictures returning to distribute, and Mendes returning to direct.

## Plot

In Istanbul, MI6 agents James Bond and Eve Moneypenny pursue mercenary Patrice, who has stolen a hard drive containing details of undercover agents. As Bond and Patrice fight atop a moving train, M orders Moneypenny to shoot Patrice, despite not having a clear shot; Moneypenny inadvertently hits Bond, who falls into a river. Bond is presumed dead and Patrice escapes with the hard drive.

Three months later, due to a public inquiry into M's handling of the stolen hard drive, she is pressured to retire by Gareth Mallory, the chairman of the Intelligence and Security Committee of Parliament and a former SAS officer. Although she claims she is still useful, MI6's servers are hacked, and M receives a taunting computer message moments before the MI6 building explodes. Bond, who used his presumed death to retire, learns of the attack and returns to service in London. He fails a series of physical, medical, and psychological examinations, but M approves his return to the field, ordering him to identify Patrice's employer, recover the hard drive, and kill Patrice. He meets Q, MI6's new quartermaster, who gives him a radio beacon and a Walther PPK pistol.

In Shanghai, Bond follows Patrice but is unable to prevent him killing a target. The two fight and Patrice falls to his death before Bond can learn his employer's identity. Moneypenney joins Bond in his investigation on orders from Mallory. Bond finds a casino token Patrice intended to cash in for the assassination, leading him to a casino in Macau. There, Bond is approached by Sévérine, Patrice's accomplice. Recognising her tattoo, he concludes she was a sex slave "rescued" by a criminal who now employs her, a man Bond wishes to meet. She warns him he is targeted by her bodyguards, but promises to help if Bond kills her employer. Bond thwarts the attack and joins Sévérine on her yacht, the *Chimera*. They travel to an abandoned island off the coast of Macau, where the crew captures and delivers them to Sévérine's employer, Raoul Silva. Once an MI6 agent, Silva turned to cyberterrorism and orchestrated the attack on MI6. Silva kills Sévérine, but Bond alerts MI6 reinforcements who capture Silva for rendition to Britain.

At MI6's new underground headquarters, Q attempts to decrypt Silva's laptop, but inadvertently gives it access to the MI6 servers, allowing Silva to escape. Q concludes Silva wanted to be captured as part of a plan to kill M, whom he hates for disavowing and betraying him to the Chinese government in 1997, leaving him to be tortured and disfigured by a failed suicide by cyanide pill. Silva escapes his cell and Bond chases him through the London Underground and thwarts Silva's attack at a Parliament inquiry where M is present.

Instructing Q and Bill Tanner to leave an electronic trail for Silva to follow, Bond uses his Aston Martin DB5 to take M to Skyfall, his childhood home in the Scottish Highlands. They meet Skyfall's gamekeeper Kincade, and together the trio set up a series of booby traps throughout the house. When Silva's men arrive, Bond, M, and Kincade kill most of them, but M is wounded. Silva arrives by helicopter with more men and heavy weapons, so Bond sends M and Kincade through a priest hole to hide in a nearby chapel, and rigs propane tanks to explode. As the house and the helicopter are destroyed, Bond escapes down the same tunnel.

Silva survives the destruction of the house, following Kincade and M to the chapel. Confronting M, Silva forces his gun into her hand and presses his temple to hers, begging her to kill them both. Bond arrives and kills Silva by throwing a knife into his back. M then succumbs to her wounds and dies in Bond's arms.

Following M's funeral, Moneypenny formally introduces herself to Bond and tells him she is retiring from fieldwork to become secretary for Mallory, the newly appointed M. Bond meets with Mallory, and tells him he is ready to get back to work.

## Cast

* Daniel Craig as James Bond, agent 007
* Judi Dench as M, the head of MI6 and Bond's superior
* Javier Bardem as Raoul Silva (born Tiago Rodriguez), an ex-MI6 operative-turned-cyberterrorist
* Ralph Fiennes as Gareth Mallory, chairman of the Joint Intelligence Committee and a former SAS Lieutenant Colonel (and later the new M)
* Naomie Harris as Eve Moneypenny, an MI6 field agent
* Bérénice Marlohe as Sévérine, Raoul Silva's associate and mistress
* Albert Finney as Kincade, the gamekeeper of the Skyfall estate
* Ben Whishaw as Q, the MI6 quartermaster
* Rory Kinnear as Bill Tanner, the MI6 Chief of Staff
* Ola Rapace as Patrice, a mercenary under Silva's command
* Helen McCrory as Clair Dowar MP

## Production

### Development

Development of *Bond 23* began in 2009 but was suspended throughout 2010 because of MGM's financial troubles.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Preproduction resumed following MGM's exit from bankruptcy on 21 December 2010, and in January 2011, the film was officially given a release date of 9 November 2012 by MGM and the Broccoli family, with production scheduled to start in late 2011. Subsequently, MGM and Sony Pictures announced that the UK release date would be brought forward to 26 October 2012, two weeks ahead of the US release date, which remained scheduled for 9 November 2012. The film's budget is estimated to have been between US$Template:Formatprice and $Template:Formatprice, compared to the $Template:Formatprice spent on *Quantum of Solace*. *Skyfall* was part of year-long celebrations of the 50th anniversary of *Dr. No* and the Bond film series. According to producer Michael G. Wilson, a documentary crew was scheduled to follow production of the film to celebrate the anniversary.

### Pre-production

After the release of *Quantum of Solace* in 2008, producer Barbara Broccoli commented that *Skyfall*, untitled at the time, may continue the plot of the Quantum organisation, introduced in *Casino Royale* and continued in *Quantum of Solace*.

In August 2011, the Serbian newspaper *Blic* stated that *Bond 23* would be titled *Carte Blanche* and would be an adaptation of the recent continuation novel by Jeffery Deaver. On 30 August, Eon Productions officially denied any link between *Bond 23* and *Carte Blanche*, stating that "the new film is not going to be called *Carte Blanche* and will have nothing to do with the Jeffery Deaver book". On 3 October 2011, fifteen domain names including *Template:Not a typo* and *Template:Not a typo* were reported to have been registered on behalf of MGM and Sony Pictures by Internet brand-protection service MarkMonitor. *Skyfall* was confirmed as the title at a press conference on 3 November 2011, during which co-producer Barbara Broccoli said that the title "has some emotional context which will be revealed in the film". The title refers to the name of Bond's childhood home, "Skyfall", and the setting for the film's finale.

#### Casting

The main cast was announced at a press conference held at the Corinthia Hotel in London on 3 November 2011, fifty years after Sean Connery had been announced as James Bond in the film *Dr. No*. Daniel Craig returned as James Bond for the third time, saying he felt lucky to have the chance. Mendes described Bond as experiencing a "combination of lassitude, boredom, depression [and] difficulty with what he's chosen to do for a living". Judi Dench returned as M for her seventh and final time. Over the course of the film, M's ability to run MI6 is called into question, culminating in a public inquiry into her running of the service.

Javier Bardem was cast as the principal villain, Raoul Silva, a cyberterrorist seeking revenge against those he holds responsible for betraying him. Bardem described Silva as "more than a villain", while Craig stated that Bond has a "very important relationship" to Silva. Mendes admitted that he had lobbied hard for Bardem to accept the part, and saw potential for the character to be recognised as one of the most memorable in the series. He wanted to create "something [the audience] may consider to have been absent from the Bond movies for a long time", and felt that Bardem was one of the few actors able to become "colourless" and exist as more than just a function of the plot. In preparing for the role, Bardem had the script translated into his native Spanish, which Mendes cited as a sign of his commitment. Bardem dyed his hair blond for the role, after brainstorming ideas for a distinct visual look with Mendes, which led some commentators to suggest a resemblance to WikiLeaks founder Julian Assange. Bérénice Marlohe was cast as Séverine, saved from the Macau sex trade by Silva and now working as his representative. Marlohe described her character as being "glamorous and enigmatic", and that she drew inspiration from *GoldenEye* villain Xenia Onatopp (played by Famke Janssen).

Ralph Fiennes was cast as Gareth Mallory, a former lieutenant colonel in the British Army and now Chairman of the Intelligence and Security Committee, which regulates MI6. At the end of the film, Mallory becomes the head of MI6, assuming the title of 'M'. During production, Fiennes stated that he could not say anything specific about the role other than that it was a "really interesting part which is really quite fun". Fiennes had previously been considered to play Bond during the casting of *GoldenEye*.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Naomie Harris was cast as the returning character of Miss Moneypenny. Harris's role was initially presented as that of Eve, an MI6 field agent who works closely with Bond. Despite media speculation that Harris had been cast as Miss Moneypenny, this was not confirmed by anyone involved in production, with Harris herself dismissing claims that Eve was in fact Moneypenny. According to Harris, Eve "[believes] she is Bond's equal, but she is really his junior". Another returning character was Q, played by Ben Whishaw. Mendes had initially declined to confirm which part Whishaw would play, and later said the idea of the re-introduction was his, saying, "I offered ideas about Moneypenny, Q and a flamboyant villain and they said yes". To play the part of Kincade, Mendes cast Albert Finney. The producers briefly considered approaching Sean Connery to play the role in a nod to the 50th anniversary of the series, but decided not to as they felt Connery's presence would have been seen as stunt casting and might disengage the audience.

#### Crew

 File:Sam Mendes 2012.jpg
Mendes first signed on to direct the project shortly after *Quantum of Solace* was released, and remained as a consultant during the uncertainty surrounding MGM's financial situation. Mendes, who had previously worked with Craig on *Road to Perdition*, was approached after seeing Craig in *A Steady Rain*, meeting after a performance, where Craig broached the subject of directing a *Bond* film for the first time. He was at first hesitant, as the job had little appeal to him, but he did not reject the offer immediately because of Craig's involvement and enthusiasm; Mendes described Craig's casting and performance in *Casino Royale* as being what he felt the *Bond* franchise needed. He agreed to direct after meeting producers Michael G. Wilson and Barbara Broccoli, and seeing the early direction the film was going to take. Media speculation was that Mendes had commissioned rewrites of the script to "[remove] action scenes in favour of 'characterful performances'" with the hope of securing an Academy Award. Mendes denied this, saying that the action scenes were an important part of the film.

Roger Deakins signed on as cinematographer, having previously worked with Mendes on *Jarhead* and *Revolutionary Road*. Dennis Gassner returned as production designer, the costume designer was Jany Temime, Alexander Witt was director of the second unit, the stunt co-ordinator was Gary Powell and Chris Corbould supervised the special effects, while the visual effects supervisor was Steve Begg. All had worked on previous *Bond* films. Daniel Kleinman returned to design the title sequence after stepping aside to allow graphic design studio MK12 to create the *Quantum of Solace* sequence.

#### Writing

Peter Morgan was originally commissioned to write a script, but left the project when MGM filed for bankruptcy and production of the film stalled; despite his departure, Morgan later stated that the final script was based on his original idea, retaining what he described as its "big hook". Mendes denied this as "just not true", insisting that Morgan's approach had been discarded once he had agreed to direct. Robert Wade later said that "Neal and I were pretty steeped in Fleming. I think Peter was more interested in Le Carré. It just didn't work." Morgan cowrote the treatment *Once Upon a Spy* with Neal Purvis and Robert Wade, which had M being blackmailed by a Russian oligarch, who would be a former KGB agent she had an affair with while stationed in West Berlin during the Cold War. The script would have ended with Bond being forced to kill M.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Mendes disliked most of the script but asked to keep the ending with M's death.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).**

Purvis and Wade then wrote a new script drawing from *You Only Live Twice* (1964) and *The Man with the Golden Gun* (1965), in which Bond is presumed dead after an accident and travels back to London to an uncertain MI6. The original screenplay would have more closely followed the literary series' story arc with Bond become an amnesiac and unknowingly impregnating his lover Lily in Turkey, who would have tracked him down to London after he returned to MI6. It would have featured Bond tracking down a Francisco Scaramanga-esque villain into the Andes Mountains, and would have had a "*Heart of Darkness* feel."**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** The screenplay was delayed because of MGM's financial problems. At the end of 2010, Purvis and Wade completed a draft titled *Nothing is Forever* in which a villain called Raoul Sousa kills M with a bombing aboard the Barcelona Metro and leaves a bureaucrat named Mallender as the new M. They still disliked the third act, and so later revised it to include the ending in Scotland.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** The final script was rewritten by John Logan, who kept most of Purvis and Wade's basic story. Logan recounted being brought into the project by his long-time friend Mendes, describing the process between Mendes and the writers as "very collaborative", and that writing *Skyfall* was one of the best experiences he had had in scripting. British playwright Jez Butterworth also provided uncredited contributions.

#### Location scouting

In April 2011, Mendes and Broccoli travelled to South Africa for location scouting. With the film moving into pre-production in August, reports emerged that shooting would take place in India, with scenes to be shot in the Sarojini Nagar district of New Delhi and on railway lines between Goa and Ahmedabad. The production crew faced complications in securing permission to close sections of the Konkan Railway. Similar problems in obtaining filming permits were encountered by production crews for *The Dark Knight Rises* and *Mission: Impossible – Ghost Protocol*. Permission was eventually granted to the Bond production crew; the production ultimately did not shoot in India.

### Filming

 File:Aston Martin DB5 (Skyfall).jpg
 File:SIS building (26327425611).jpg
Principal photography was scheduled to take up to 133 days, although actually took 128. It began on 7 November 2011 in London, with Deakins using Arri Alexa digital cameras to shoot the entire film. It was the first Bond film to be shot digitally. Scenes were shot in London Underground stations, Smithfield car park in West Smithfield, the National Gallery, Southwark, Whitehall, Parliament Square, Charing Cross station, the Old Royal Naval College in Greenwich, Cadogan Square and Tower Hill. St Bartholomew's Hospital was used for the scene in which Bond enters MI6's underground headquarters, while the Old Vic Tunnels underneath Waterloo Station served as the MI6 training grounds. The meeting between Q and Bond was filmed when the National Gallery was closed at night. The Department of Energy and Climate Change offices were used for the scene near the end, when Bond stands on the roof. Vauxhall Bridge and Millbank were closed to traffic for filming the explosion at the MI6 headquarters at Vauxhall Cross. Unlike for *The World Is Not Enough*, which featured an explosion at the building filmed at a large-scale replica, this explosion was added digitally during post-production. The finale was planned for Duntrune Castle in Argyll, but shortly after filming began the location was changed to Glencoe. Although supposedly in Scotland, Bond's family home was constructed on Hankley Common in Surrey using a plywood and plaster full-scale model of the building.

 File:Hacıkırı Varda Demiryolu Köprüsü.jpg
Production moved to Turkey in March 2012, with filming continuing until 6 May. Adana stands in for the outskirts of Istanbul. Some Turkish teenagers infiltrated a closed set in railway sidings in Adana, during film rehearsals of the fight on top of a train, before they were caught by security. The train scene depicted in trailers showed the Varda Viaduct outside Adana, during which Bond stunt double Andy Lister dived backwards off the 300-foot (91 m)
300-foot (91 m) drop, with a crane on a train carriage holding a safety line. Parts of Istanbul—including the Spice Bazaar, Yeni Camii, the Grand Post Office, Sultanahmet Square and the Grand Bazaar—were closed for filming in April. Affected store owners were reportedly allowed to open their shops, but not allowed to conduct business, instead being paid TRYTemplate:Turkish lira750 ($418) per day as compensation. Production was criticised for allegedly damaging buildings while filming a motorcycle chase across rooftops. Wilson denied this, pointing out that the crew had removed sections of rooftop before filming, and replaced them with temporary replicas. The production team negotiated with 613 part-owners of Calis Beach in Fethiye to film along the coastline.

Mendes confirmed that China would feature in the film, with shooting scheduled for Shanghai and "other parts" of the country. Logan asserted that they deliberately sought locations that were "in opposition" to London, with an exotic quality as "places for Bond to be uncomfortable". Scenes with the principal actors were not filmed on location in Shanghai, but in the UK. The Virgin Active pool in London's Canary Wharf acted as Bond's hotel pool, Ascot Racecourse stood in for Shanghai Pudong International Airport, and London's Broadgate Tower was used as the entrance and lobby of the Shanghai office building. The Golden Dragon casino in Macau was constructed on a sound stage at Pinewood Studios, with 300 floating lanterns and two 30-foot-high dragon heads lighting the set. The production received permission to shoot second unit aerial footage of Shanghai from a helicopter loaned by the Chinese government. The first official image from the film was released on 1 February 2012, showing Craig on set at Pinewood within a recreation of a Shanghai skyscraper.

The lair of villain Silva was inspired by Hashima, an abandoned island off the coast of Nagasaki, Japan. In the film, the fictionalized island is located near Macau. Mendes explained that the sequence was created with a combination of large sets of the city streets and computer-generated establishing shots. The Hashima setting was included after Craig met with Swedish film-maker Thomas Nordanstad while shooting *The Girl with the Dragon Tattoo* in Stockholm. Nordanstad, who produced a short 2002 documentary on the island entitled *Hashima*, recalled Craig taking extensive notes during the meeting, but was unaware of his interest in it until *Skyfall* was released.

The film was later converted into the IMAX format for projection in IMAX cinemas. Deakins was unaware that the film was to be released on IMAX until after he had made the decision to shoot the film with the Arri Alexa cameras, and was unhappy with the IMAX tests made from his footage as the colours "didn't look great". After exploring the IMAX system further and discovering that the IMAX Corporation was using their proprietary re-mastering process, Deakins had further tests made without the process and found that "the images looked spectacular on the big IMAX screen", quelling his doubts about the format.

### Music

 File:Thomas Newman.jpg
*Main article: Skyfall: Original Motion Picture Soundtrack*
Thomas Newman, who had previously worked with Mendes as composer for *American Beauty*, *Road to Perdition*, *Jarhead* and *Revolutionary Road*, replaced David Arnold as composer, becoming the ninth composer in the series' history. When asked about the circumstances surrounding his departure from the role, David Arnold commented that Newman had been selected by Mendes because of their work together, rather than because of Arnold's commitment to working with director Danny Boyle as composer for the Opening Ceremony of the 2012 Summer Olympics. The soundtrack album was released on 29 October 2012 in the United Kingdom and on 6 November 2012 in the United States.

In October 2012 British singer-songwriter Adele confirmed that she had written and recorded the film's theme song with her regular songwriter, Paul Epworth. She later posted the cover for the "Skyfall" sheet music on Twitter, crediting the songwriting to herself and Epworth, with arrangements to both Epworth and orchestrator J. A. C. Redford. The song was released online at 0:07 am BST on 5 October 2012, a day dubbed "James Bond Day" by the producers as it marked 50 years to the day of the release of *Dr. No*.

The song was nominated for and won the Academy Award for Best Original Song. It was the first time a Bond song had won, and the fourth time one had been nominated.Template:Efn "Skyfall" also won the Brit Award for Best British Single at the 2013 BRIT Awards.

The film also features Charles Trenet's 1938 song "Boum !" during scenes in which Silva shows Bond around his abandoned island, and The Animals' 1964 cover of John Lee Hooker's song, "Boom Boom" when Silva assaults Skyfall in the film's finale.

## Release and reception

The premiere of *Skyfall* was on 23 October 2012 at the Royal Albert Hall in London. The event was attended by Charles, Prince of Wales, and his wife Camilla, Duchess of Cornwall. Charles asked that money raised at the premiere be donated to charities that served former or serving members of the British intelligence agencies. The film was released in the UK three days later on 26 October and into US cinemas on 8 November. *Skyfall* was the first Bond film to be screened in IMAX venues and was released into IMAX cinemas in North America a day earlier than the conventional cinema release.

*Skyfall* attracted some criticism from the US Sexual Violence Resource Center which, without having screened the film, expressed concern that Bond "abuses his power and authority" in a scene that suggests Bond initiates sexual intercourse with Sévérine, a former victim of sex trafficking.

### Box office

*Skyfall* earned $1.109 billion worldwide, and at the time of its release was the highest-grossing film worldwide for Sony Pictures and the second-highest-grossing film of 2012. On its opening weekend, it earned $80.6 million from 25 markets. In the UK the film grossed £20.1 million on its opening weekend, making it the second-highest Friday-to-Sunday debut ever behind *Harry Potter and the Deathly Hallows – Part 2*. It also achieved the second-highest IMAX debut ever behind *The Dark Knight Rises*. The film set a record for the highest seven-day gross with £37.2 million, surpassing previous record holder *Deathly Hallows – Part 2* (£35.7 million). By 9 November 2012 the film had earned over £57 million to surpass *The Dark Knight Rises* as the highest-grossing film of 2012, and the highest-grossing James Bond film of all time in the UK. After 40 days of release the total UK gross stood at £94.28 million, making *Skyfall* the highest-grossing film in the UK, surpassing the £94.03 million of *Avatar*. By 30 December 2012, it had become the first film to gross more than £100 million ($161.6 million) in the UK. *Skyfall*'s box office receipts made it only the 14th film and first Bond film to gross over $1 billion, the seventh-highest-grossing film ever made at the time, pushing it past the inflation-adjusted amount of $1.047 billion earned by *Thunderball*.

Template:Multiple image
*Skyfall* set an opening weekend record in Switzerland ($5.3 million) and recorded the second-largest opening weekend of the year for a Hollywood film in India after *The Amazing Spider-Man* ($5.1 million), as well as grossing $14.3 million on its opening weekend in France. In Austria, it achieved the second-highest opening weekend ever ($3.4 million) behind *The Lord of the Rings: The Return of the King*, while in Finland, it scored the largest opening weekend when excluding previews ($1.47 million).

In North America, the film opened in 3,505 cinemas, the widest opening for a Bond film. The film earned $2.4 million from midnight showings on its opening day and a further $2.2 million from IMAX and large-format cinemas. *Skyfall* went on to gross $30.8 million on its opening day in the US and Canada, and $88.4 million in its opening weekend, the biggest debut yet for a Bond film. By the end of its theatrical run, the film earned $304.4 million in the United States and Canada, making it the fourth-highest-grossing film of 2012 in these regions.

### Critical response

*Skyfall* received "generally positive reviews from critics and fans", according to the *GlobalPost*. On review aggregator website Rotten Tomatoes, the film received an approval rating of 92% based on 384 reviews, with an average rating of 8.20/10. The site's critical consensus reads, "Sam Mendes brings Bond surging back with a smart, sexy, riveting action thriller that qualifies as one of the best 007 films to date." On Metacritic, the film has a weighted average score of 81 out of 100 based on 49 critics, indicating "universal acclaim". CinemaScore polls reported that the average grade filmgoers gave the film was an "A" on an A+ to F scale.

A number of critics, including Kate Muir, reviewing for *The Times*, Philip French, writing in *The Observer*, IGN's Daniel Krupa and the reviewers for the *Irish Independent* and the *Daily Record*, all asked whether *Skyfall* was the best Bond film produced. *The Daily Telegraph*'s film reviewer, Robbie Collin, considered *Skyfall* to be "often dazzling, always audacious", with excellent action sequences in a film that contained humour and emotion. Todd McCarthy of *The Hollywood Reporter* thought that *Skyfall* was "dramatically gripping while still brandishing a droll undercurrent of humor", going on to say that it was a film that had "some weight and complexity to it". *Variety*Template:'s Peter DeBruge suggested that the film's greatest strength lay in its willingness to put as much focus on characterisation as it did action set-pieces, allowing the two to co-exist rather than compete for the audience's attention, while Manohla Dargis, reviewing for *The New York Times*, considered *Skyfall* to be "a superior follow-up to *Casino Royale*" which is "opulent rather than outlandish and insistently, progressively low-key". Kim Newman, reviewing the film for *Empire*, concluded, "*Skyfall* is pretty much all you could want from a 21st Century Bond: cool but not camp, respectful of tradition but up to the moment, serious in its thrills and relatively complex in its characters but with the sense of fun that hasn't always been evident lately". Roger Ebert of the *Chicago Sun-Times* gave the film 4 out of 4 stars, describing it as "a full-blooded, joyous, intelligent celebration of a beloved cultural icon". Reviewing for the *New Statesman*, Ryan Gilbey saw that "nostalgia permeates the movie", going on to say that "sometimes the old ways are the best".

A number of reviewers praised Daniel Craig's lead performance. Roger Ebert believed that in *Skyfall*, "Daniel Craig [takes] full possession of a role he earlier played well in 'Casino Royale,' not so well in 'Quantum'"; Philip French commented that "Craig manages to get out of the shadow of [Sean] Connery"; while Daniel Krupa thought Craig's Bond was a "defining performance" for "a great actor". Edward Porter, writing in *The Sunday Times*, considered that "Craig has developed an authoritative Bond persona, dry and intelligent". Ryan Gilbey thought Craig had "relaxed into Bond without losing any steeliness".

The supporting cast also received praise. Roger Ebert reflected that *Skyfall* "at last provides a role worthy of Judi Dench, one of the best actors of her generation. She is all but the co-star of the film, with a lot of screen time, poignant dialogue, and a character who is far more complex and sympathetic than we expect in this series". Jenny McCartney, writing in *The Sunday Telegraph*, agreed, describing Dench as "compellingly luminous" in the film, and the one that "the camera caresses most meaningfully and often". McCartney thought Javier Bardem played Silva "with worrisome élan", while Henry K Miller considered his character "the most authentically Bondian Bond villain in decades". A number of critics noted the strength of the supporting cast; Kim Newman found the "warmth and gravitas" of Finney's performance noteworthy, while other reviewers, including Edward Porter, Daniel Krupa and *The Playlist*'s Oliver Lyttelton, singled out Ralph Fiennes as Mallory and Ben Whishaw as Q.

Ann Hornaday, writing for *The Washington Post*, thought Sam Mendes had reinvigorated the series, with *Skyfall* being "sleek, crisp, classy ... exhibiting just the right proportion of respect for legacy and embrace of novelty". Henry K. Miller of *Sight & Sound* agreed, and praised Mendes, who he thought was worthy of directing more Bond films. Kim Newman also praised Mendes's direction of the action sequences. The work of cinematographer Roger Deakins also received praise: Newman commented that he "delivers the most impressive visuals this series has had since the 1960s", and Miller described the film as "dazzlingly photographed".

The film did not escape criticism, with reviews pointing to its two and a half-hour running time, and the final third of the film being "protracted", and not matching the first two thirds in its momentum as the underlying flaws in the film. Xan Brooks of *The Guardian*, in an otherwise positive review, criticised the "touchy-feely indulgence" of "the bold decision to open Bond up – to probe at the character's back-story and raise a toast to his relationship with M". Daniel Krupa also singled out Naomie Harris as "awkward" and having "virtually non-existent chemistry" with Craig. Similarly Philip French in *The Observer* tempered his praise for the film by highlighting "some lazy repetition" and argued, "the badinage is often perfunctory and Bond is as usual captured too easily and too easily escapes". Edward Porter, writing in *The Sunday Times*, considered that while aspects of the film were "achieved with wit and panache", he found that the climax to the film was slightly disappointing, although the "weaknesses in the final stages are not serious, however, and the film's brief epilogue is wonderful".

### Home media

 File:King's Cross railway station MMB B0.jpg
*Skyfall* was released on DVD, Blu-ray, and digital HD in the US and Canada on 12 February 2013, and in the UK on 18 February 2013.

It was later released on Ultra HD Blu-ray on 22 October 2019 along with the other three Daniel Craig Bond movies in a 4K boxset, with this release itself being released standalone 25 February 2020 by 20th Century Studios Home Entertainment.

## See also

**Lua error: bad argument #2 to 'title.new' (unrecognized namespace name 'Portal').**

* *Happy and Glorious*, a short film starring Daniel Craig as James Bond produced for the 2012 Summer Olympics opening ceremony
* List of films featuring home invasions
* Outline of James Bond

## Notes and references

### References

1. ↑ 1.0 1.1 Skyfall. *AFI Catalog*.
2. ↑ Skyfall. British Board of Film Classification (BBFC) (12 October 2012).
3. ↑ Skyfall. European Audiovisual Observatory.
4. ↑ 4.0 4.1 4.2 4.3 Skyfall. Box Office Mojo.
5. ↑ 5.0 5.1 Template:Cite press release
6. ↑ Javier Bardem Speaks. Mi6-hq.com (7 April 2012).
7. ↑ Template:Cite press release
8. ↑ Sizemore, Charles. "Bond Investing. James Bond Investing", *Forbes*, 10 October 2012.
9. ↑ Smith, Grady. "Box office update: 'Skyfall' blazes past $100 million internationally", *Entertainment Weekly*, 1 November 2012.
10. ↑ Dawn, Randee. "'Quantum' is Marc Forster's 007 art film", *The Hollywood Reporter*, 11 November 2008.
11. ↑ 11.0 11.1 11.2 11.3 11.4 Template:Cite video
12. ↑ Bond producer hints at Craig trilogy. Digital Spy (15 November 2008).
13. ↑ Serbian to play cello in Bond movie. Blic Online.
14. ↑ Simpson, Colin (31 August 2011). Bond makers deny online title rumours. *The National*.
15. ↑ Reynolds, Simon (3 November 2011). James Bond 23 press conference: Daniel Craig on 'Skyfall' – video. Digital Spy.
16. ↑ Sherlock, Ben (2 September 2019). James Bond: 5 Title Suggestions That Were Better Than No Time To Die (& 5 That Were Worse). Screen Rant.
17. ↑ Press conference coverage:

	* Bradshaw, Peter. "Skyfall, the next James Bond film, has plenty going for it", *The Guardian*, 3 November 2011.
	* James Bond 'Skyfall' Press Conference. Digital Spy (3 November 2011).
18. ↑ 18.0 18.1 18.2 Macnab, Geoffrey. "Bond 23's title confirmed as Skyfall", 3 November 2011.
19. ↑ "James Bond 23 to be called 'Skyfall'", *The Daily Telegraph*, 3 November 2011.
20. ↑ Torchia, Christopher. "New 007 film to depict spy's inner demons", Yahoo!, 29 April 2012.
21. ↑ Coyle, Jake. "Judi Dench On *Skyfall* & Her Reign As M", *The Huffington Post*, 9 November 2012.
22. ↑ The Secrets of Skyfall. Epix (5 October 2012).
23. ↑ Collin, Robbie. "Skyfall, James Bond, review", *The Daily Telegraph*, 24 October 2012.
24. ↑ Garibaldi, Christina. "Daniel Craig Talks 'Bigger, Better' Bond On 'Skyfall' Set", MTV, 10 April 2012.
25. ↑ Rutter, Clare. "Sam Mendes On 'Skyfall' Villain Javier Bardem: 'Silva's Up There With The Greats'", Entertainmentwise, 31 August 2012.
26. ↑ "Javier Bardem is the perfect villain", Sky News, 31 August 2012.
27. ↑ "Javier Bardem GQ Interview: On 'Skyfall' And Turning Down 'Minority Report'", Moviefone, 20 September 2012.
28. ↑ Martinovic, Paul. "Javier Bardem on 'Skyfall': "I don't want to see my funny hair"", Digital Spy, 30 September 2012.
29. ↑ 29.0 29.1 29.2 Collin, Robbie. "007: a superhero for our times; its action scenes are dazzling as ever, but the latest Bond is also full of humour and warmth", 26 October 2012, p. 33.
30. ↑ Gilbey, Ryan. "How James Bond villains reflect the fears and paranoia of their era", 1 August 2012.
31. ↑ 31.0 31.1 "'Skyfall' director Sam Mendes addresses racial profiling of Bond films", Electronic Urban Report, 18 October 2012.
32. ↑ "Daniel Craig returns as James Bond in new movie Skyfall", *The Sydney Morning Herald*, 4 November 2011.
33. ↑ Lawless, Jill. "Next Bond title revealed: 'Skyfall'", *Chicago Sun-Times*, 4 November 2011.
34. ↑ Simon Reynolds and Tom Mansell (26 March 2012). 'Skyfall': Bérénice Marlohe talks Bond girl Severine – video – Movies News. Digital Spy.
35. ↑ Crowther, Jane. "Daniel Craig talks Skyfall: On-set report", Total Film, 11 April 2012.
36. ↑ "Film Synopsis", *Empire*, 15 September 2012.
37. ↑ "IGN Has Seen the Skyfall", IGN, 16 April 2012.
38. ↑ Vineyard, Jen. "Ralph Fiennes Teases Blofeld Role in New Bond Film 'Skyfall'; Talks Shakespearean Adaptation Of 'Coriolanus'", The Playlist, 7 November 2011.
39. ↑ 39.0 39.1 'Lost' James Bond film Once Upon a Spy would have seen 007 killing M (en) (2015-11-20).
40. ↑ Child, Ben. "Naomie Harris set to bring Miss Moneypenny back in Bond 23", 11 July 2011.
41. ↑ Naomie Harris confirmed to play Moneypenny in 'Bond 23'. The Grio (8 July 2011).
42. ↑ Vejvoda, Jim (18 January 2012). No Miss Moneypenny in Skyfall. IGN.
43. ↑ "Skyfalls in for James Bond fans as Daniel Craig begins his latest film role on a roof top in London", 6 December 2011.
44. ↑ "Ben Whishaw cast as Q in new James Bond film Skyfall", BBC News Online, 25 November 2011.
45. ↑ Douglas, Edward (16 April 2012). Bond Week: From the Set of *Skyfall*. CraveOnline.
46. ↑ Ryan, Mike. "Sam Mendes, 'Skyfall' Director, on Bringing Humor Back to James Bond & Flirting with the Idea of Casting Sean Connery", *The Huffington Post*, 5 November 2012.
47. ↑ 47.0 47.1 Reid, Vicki. "Skyfall: Daniel Craig takes James Bond to another level", *The Daily Telegraph*, 23 October 2012.
48. ↑ Chapman, Matt (25 October 2011). Bond 23 axes the action, targets an Oscar. Total Film.
49. ↑ Heuring, David (25 October 2010). 'Skyfall:' Double Agents, Data Recording, Roger Deakins. NewBay Media.
50. ↑ Rosen, Christopher. "'Skyfall' Opening Credits Arrive Online (Video)", *The Huffington Post*, 14 November 2012.
51. ↑ Daniel Craig's 'James Bond 23' retains Peter Morgan plot idea – Movies News. Digital Spy (8 September 2011).
52. ↑ Lovece, Frank. "'Skyfall' rising: Oscar winner Sam Mendes guides 007's return to big screen", *Film Journal International*, 6 November 2012.
53. ↑ Reynolds, Simon (2015-11-19). Lost Bond movie would've seen 007 kill Judi Dench's M (en-GB).
54. ↑ Jagernauth, Kevin (2015-11-20). Peter Morgan's Unmade Bond Movie 'Once Upon A Spy' Would've Featured 007's Most Shocking Kill Yet (en).
55. ↑ McNary, Dave. "Bond to return with Daniel Craig, Sam Mendes", *Variety*, 11 January 2011.
56. ↑ Chitwood, Adam. "Screenwriter John Logan Talks About His Approach to New James Bond Film *Skyfall* and Action Set-Pieces", Collider.com, 20 November 2011.
57. ↑ Brockes, Emma. "All or Nothing", *New Yorker*, 10 November 2014.
58. ↑ Gallagher, Brian (6 April 2011). James Bond 23 Scouting Locations in South Africa. MovieWeb.
59. ↑ Bond will be shot in India. *Hindustan Times* (30 July 2011).
60. ↑ "Latest James Bond film to be shot in India", *The Times of India*, 31 August 2011.
61. ↑ "Bond going off track in India?", *The Times of India*, 22 August 2011.
62. ↑ "James Bond's author was friend of Gujarat royalty", *The Times of India*, 17 November 2012.
63. ↑ "Unbonding with India?", *The Times of India*, 30 August 2011.
64. ↑ "Bond could have shot", *The Times of India*, 26 September 2011.
65. ↑ Patches, Matt. "'Skyfall': Hollywood.com Visits the Set of Bond's Latest Mission", Hollywood.com, 1 May 2012.
66. ↑ Giroux, Jack (6 November 2012). Roger Deakins Makes Bond Cool Again With 'Skyfall'. Film School Rejects.
67. ↑ Skyfall: James Bond Press Conference (Full, Unedited). YouTube.
68. ↑ 68.0 68.1 68.2 Skyfall set to be the biggest Bond yet. ARRI.
69. ↑ Plumb, Ali (17 August 2012). Skyfall London Locations Videoblog Hits. Empire.
70. ↑ 70.0 70.1 70.2 Film locations for Skyfall (2012). The Worldwide Guide To Movie Locations (27 November 2012).
71. ↑ 71.0 71.1 71.2 "Skyfall exclusive: Daniel Craig on filming new Bond in London", *The Daily Telegraph*, 16 August 2012.
72. ↑ Daniel Craig interview. Time Out.
73. ↑ The name's Underground, London Underground. Transport FOr London (26 October 2012).
74. ↑ Stephens, Neil. "No, Mr Bond; I expect you to die", Footprints of London, 5 January 2012.
75. ↑ Tower Hill Filming. M!6 HQ (3 February 2012).
76. ↑ 76.0 76.1 76.2 76.3 76.4 76.5 76.6 76.7 76.8 Acuna, Kirsten (22 October 2012). Take A Tour Inside The Filming Locations of the Latest Bond Film, 'Skyfall'. Business Insider.
77. ↑ Failes, Ian (21 November 2012). Bond's boldest adventure yet: *Skyfall*. Fxguide.
78. ↑ Scotland's oldest inhabited castle to star in next James Bond movie. Daily Record (25 September 2011).
79. ↑ MacLarty, Leanna. "James Bond movie bosses change mind about filming at Scots castle", STV, 17 November 2011.
80. ↑ Lefley, Jack. "Blown Skyfall High", 26 March 2012, p. 11.
81. ↑ "Skyfall's secret lies in the Highlands", 15 October 2012, p. 11.
82. ↑ 82.0 82.1 82.2 "James Bond film crew to close part of Istanbul", 9 April 2012.
83. ↑ "Bond to visit Adana!", *Sabah English*, Ahmet Çalık, 26 December 2011.
84. ↑ Eff, Tora. "James Bond set-besøg i Adana", Kino, 13 April 2012. (in da)
85. ↑ "CINEMA-TV – Teens infiltrate James Bond set, film fight scene", 12 March 2012.
86. ↑ "We are careful not to damage cultural values: Bond producer", 23 April 2012.
87. ↑ Maddox, Garry. "James Bond's Britain", 25 November 2012.
88. ↑ Mathieson, Amy. Ascot racecourse to star in James Bond film. Horse & Hound.
89. ↑ First official picture from Skyfall revealed. Eon Productions and Metro-Goldwyn-Mayer (1 February 2012).
90. ↑ Douglas, Edward. "Bond Week: Four New Skyfall Photos!", CraveOnline, 11 April 2012.
91. ↑ "Skyfall Preview and Pics", IGN, 12 April 2012.
92. ↑ Lovece, Frank. "'Skyfall' James Bond still stirs series principals", *Newsday*, 7 November 2012.
93. ↑ Boyd, Clark (23 November 2012). The History of Hashima, the Island in Bond Film "Skyfall". The World.
94. ↑ "Newman on Board For *Skyfall'**", Eon Productions, 9 January 2012.*
95. ↑ @DavidGArnold: 10 January. Twitter (10 January 2012).
96. ↑ 'Skyfall' Soundtrack Update. Film Music Reporter (5 October 2012).
97. ↑ Cochrane, Greg. "Skyfall: Adele confirms James Bond theme song", BBC News Online, 1 October 2012.
98. ↑ "Adele to sing theme to new James Bond film Skyfall", itv.com, 2 October 2012.
99. ↑ Skyfall sheet. Adele Official Twitter (1 October 2012).
100. ↑ Skyfall Official Theme Song News Release to Coincide with Bond's 50th Anniversary. 007.com (1 October 2012).
101. ↑ Oscar Nominations 2013: Adele's 'Skyfall', 'Les Miserables' And Daniel Day-Lewis Lead British Hopes. *The Huffington Post* (10 January 2013).
102. ↑ Furness, Hannah. "Oscars 2013: Adele nomination saves total Skyfall snub", *The Telegraph*, 10 January 2013.
103. ↑ "Brit Awards: Emeli Sande gets four nominations" --[[ ----------------------------------

Lua module implementing the Template loop detected: Template:Webarchive template.

A merger of the functionality of three templates: Template:Wayback, Template:Webcite and Template:Cite archives

]]

--[[--------------------------< D E P E N D E N C I E S >------------------------------------------------------
]]

require('Module:No globals');
local getArgs = require ('Module:Arguments').getArgs;

--[[--------------------------< F O R W A R D D E C L A R A T I O N S >--------------------------------------
]]

local categories = {}; -- category names
local config = {}; -- global configuration settings
local digits = {}; -- for i18n; table that translates local-wiki digits to western digits
local err\_warn\_msgs = {}; -- error and warning messages
local excepted\_pages = {};
local month\_num = {}; -- for i18n; table that translates local-wiki month names to western digits
local prefixes = {}; -- service provider tail string prefixes
local services = {}; -- archive service provider data from
local s\_text = {}; -- table of static text strings used to build final rendering
local uncategorized\_namespaces = {}; -- list of namespaces that we should not categorize
local uncategorized\_subpages = {}; -- list of subpages that should not be categorized

--[[--------------------------< P A G E S C O P E I D E N T I F I E R S >----------------------------------
]]

local non\_western\_digits; -- boolean flag set true when data.digits.enable is true
local this\_page = mw.title.getCurrentTitle();

local track = {}; -- Associative array to hold tracking categories
local ulx = {}; -- Associative array to hold template data

--[[--------------------------< S U B S T I T U T E >----------------------------------------------------------

Populates numbered arguments in a message string using an argument table.

]]

local function substitute (msg, args)
 return args and mw.message.newRawMessage (msg, args):plain() or msg;
end

--[[--------------------------< tableLength >-----------------------

Given a 1-D table, return number of elements

]]

local function tableLength(T)
 local count = 0
 for \_ in pairs(T) do count = count + 1 end
 return count
end

--[=[-------------------------< M A K E \_ W I K I L I N K >----------------------------------------------------

Makes a wikilink; when both link and display text is provided, returns a wikilink in the form D; if only
link is provided, returns a wikilink in the form L; if neither are provided or link is omitted, returns an
empty string.

]=]

local function make\_wikilink (link, display, no\_link)
 if nil == no\_link then
 if link and ( *~= link) then*
 if display and ( *~= display) then*
 return table.concat ({'', display, ''});
 else
 return table.concat ({'', link, ''});
 end
 end
 return display or *; -- link not set so return the display text*

 else -- no\_link
 if display and ( *~= display) then -- if there is display text*
 return display; -- return that
 else
 return link or *; -- return the target article name or empty string*
 end
 end
end

--[[--------------------------< createTracking >-----------------------

Return data in track[] ie. tracking categories

]]

local function createTracking()
 if not excepted\_pages[this\_page.fullText] then -- namespace:title/fragment is allowed to be categorized (typically this module's / template's testcases page(s))
 if uncategorized\_namespaces[this\_page.nsText] then
 return *; -- this page not to be categorized so return empty string*
 end
 for \_,v in ipairs (uncategorized\_subpages) do -- cycle through page name patterns
 if this\_page.text:match (v) then -- test page name against each pattern
 return *; -- this subpage type not to be categorized so return empty string*
 end
 end
 end

 local out = {};
 if tableLength(track) > 0 then
 for key, \_ in pairs(track) do -- loop through table
 table.insert (out, make\_wikilink (key)); -- and convert category names to links
 end
 end
 return table.concat (out); -- concat into one big string; empty string if table is empty

end

--[[--------------------------< inlineError >-----------------------

Critical error. Render output completely in red. Add to tracking category.

This function called as the last thing before abandoning this module

]]

local function inlineError (msg, args)
 track[categories.error] = 1
 return table.concat ({
 'Error in ', -- open the error message span
 config.tname, -- insert the local language template name
 ' template: ',
 substitute (msg, args), -- insert the formatted error message
 '.', -- close the span
 createTracking() -- add the category
 })
end

--[[--------------------------< inlineRed >-----------------------

Render a text fragment in red, such as a warning as part of the final output.
Add tracking category.

 ]]

local function inlineRed(msg, trackmsg)
 if trackmsg == "warning" then
 track[categories.warning] = 1;
 elseif trackmsg == "error" then
 track[categories.error] = 1;
 end

 return '' .. msg .. ''
end

--[[--------------------------< base62 >-----------------------

Convert base-62 to base-10
Credit: https://de.wikipedia.org/wiki/Modul:Expr

]]

local function base62( value )
 local r = 1 -- default return value is input value is malformed

 if value:match ('%W') then -- value must only be in the set [0-9a-zA-Z]
 return; -- nil return when value contains extraneous characters
 end

 local n = #value -- number of characters in value
 local k = 1
 local c
 r = 0
 for i = n, 1, -1 do -- loop through all characters in value from ls digit to ms digit
 c = value:byte( i, i )
 if c >= 48 and c <= 57 then -- character is digit 0-9
 c = c - 48
 elseif c >= 65 and c <= 90 then -- character is ascii a-z
 c = c - 55
 else -- must be ascii A-Z
 c = c - 61
 end
 r = r + c \* k -- accumulate this base62 character's value
 k = k \* 62 -- bump for next
 end -- for i

 return r
end

--[[--------------------------< D E C O D E \_ D A T E >--------------------------------------------------------

Given a date string, return it in iso format along with an indicator of the date's format. Except that month names
must be recognizable as legitimate month names with proper capitalization, and that the date string must match one
of the recognized date formats, no error checking is done here; return nil else

]]

local function decode\_date (date\_str)
 local patterns = {
 ['dmy'] = {'^(%d%d?) +([^%s%d]+) +(%d%d%d%d)$', 'd', 'm', 'y'}, -- %a does not recognize unicode combining characters used by some languages
 ['mdy'] = {'^([^%s%d]+) (%d%d?), +(%d%d%d%d)$', 'm', 'd', 'y'},
 ['ymd'] = {'^(%d%d%d%d) +([^%s%d]+) (%d%d?)$', 'y', 'm', 'd'}, -- not mos compliant at en.wiki but may be acceptible at other wikis
 };

 local t = {};

 if non\_western\_digits then -- this wiki uses non-western digits?
 date\_str = mw.ustring.gsub (date\_str, '%d', digits); -- convert this wiki's non-western digits to western digits
 end

 if date\_str:match ('^%d%d%d%d%-%d%d%-%d%d$') then -- already an iso format date, return western digits form
 return date\_str, 'iso';
 end

 for k, v in pairs (patterns) do
 local c1, c2, c3 = mw.ustring.match (date\_str, patterns[k][1]); -- c1 .. c3 are captured but we don't know what they hold

 if c1 then -- set on match
 t = { -- translate unspecified captures to y, m, and d
 [patterns[k][2]] = c1, -- fill the table of captures with the captures
 [patterns[k][3]] = c2, -- take index names from src\_pattern table and assign sequential captures
 [patterns[k][4]] = c3,
 };
 if month\_num[t.m] then -- when month not already a number
 t.m = month\_num[t.m]; -- replace valid month name with a number
 else
 return nil, 'iso'; -- not a valid date form because month not valid
 end

 return mw.ustring.format ('%.4d-%.2d-%.2d', t.y, t.m, t.d), k; -- return date in iso format
 end
 end
 return nil, 'iso'; -- date could not be decoded; return nil and default iso date
end

--[[--------------------------< makeDate >-----------------------

Given year, month, day numbers, (zero-padded or not) return a full date in df format
where df may be one of:
 mdy, dmy, iso, ymd

on entry, year, month, day are presumed to be correct for the date that they represent; all are required

in this module, makeDate() is sometimes given an iso-format date in year:
 makeDate (2018-09-20, nil, nil, df)
this works because table.concat() sees only one table member

]]

local function makeDate (year, month, day, df)
 local format = {
 ['dmy'] = 'j F Y',
 ['mdy'] = 'F j, Y',
 ['ymd'] = 'Y F j',
 ['iso'] = 'Y-m-d',
 };

 local date = table.concat ({year, month, day}, '-'); -- assemble year-initial numeric-format date (zero padding not required here)

 if non\_western\_digits then -- this wiki uses non-western digits?
 date = mw.ustring.gsub (date, '%d', digits); -- convert this wiki's non-western digits to western digits
 end

 return mw.getContentLanguage():formatDate (format[df], date);
end

--[[--------------------------< I S \_ V A L I D \_ D A T E >----------------------------------------------------

Returns true if date is after 31 December 1899 (why is 1900 the min year? shouldn't the internet's date-of-birth
be min year?), not after today's date, and represents a valid date (29 February 2017 is not a valid date). Applies
Gregorian leapyear rules.

all arguments are required

]]

local function is\_valid\_date (year, month, day)
 local days\_in\_month = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
 local month\_length;
 local y, m, d;
 local today = os.date ('\*t'); -- fetch a table of current date parts

 if not year or  *== year or not month or*  == month or not day or  *== day then*
 return false; -- something missing
 end

 y = tonumber (year);
 m = tonumber (month);
 d = tonumber (day);

 if 1900 > y or today.year < y or 1 > m or 12 < m then -- year and month are within bounds TODO: 1900?
 return false;
 end

 if (2==m) then -- if February
 month\_length = 28; -- then 28 days unless
 if (0==(y%4) and (0~=(y%100) or 0==(y%400))) then -- is a leap year?
 month\_length = 29; -- if leap year then 29 days in February
 end
 else
 month\_length=days\_in\_month[m];
 end

 if 1 > d or month\_length < d then -- day is within bounds
 return false;
 end
 -- here when date parts represent a valid date
 return os.time({['year']=y, ['month']=m, ['day']=d, ['hour']=0}) <= os.time(); -- date at midnight must be less than or equal to current date/time
end

--[[--------------------------< decodeWebciteDate >-----------------------

Given a URI-path to Webcite (eg. /67xHmVFWP) return the encoded date in df format

returns date string in df format - webcite date is a unix timestamp encoded as bae62
or the string 'query'

]]

local function decodeWebciteDate(path, df)

 local dt = {};
 local decode;

 dt = mw.text.split(path, "/")

 -- valid URL formats that are not base62

 -- http://www.webcitation.org/query?id=1138911916587475
 -- http://www.webcitation.org/query?url=http..&date=2012-06-01+21:40:03
 -- http://www.webcitation.org/1138911916587475
 -- http://www.webcitation.org/cache/73e53dd1f16cf8c5da298418d2a6e452870cf50e
 -- http://www.webcitation.org/getfile.php?fileid=1c46e791d68e89e12d0c2532cc3cf629b8bc8c8e

 if dt[2]:find ('query', 1, true) or
 dt[2]:find ('cache', 1, true) or
 dt[2]:find ('getfile', 1, true) or
 tonumber(dt[2]) then
 return 'query';
 end

 decode = base62(dt[2]); -- base62 string -> exponential number
 if not decode then
 return nil; -- nil return when dt[2] contains characters not in %w
 end
 dt = os.date('\*t', string.format("%d", decode):sub(1,10)) -- exponential number -> text -> first 10 characters (a unix timestamp) -> a table of date parts

 decode = makeDate (dt.year, dt.month, dt.day, 'iso'); -- date comparisons are all done in iso format with western digits
 if non\_western\_digits then -- this wiki uses non-western digits?
 decode = mw.ustring.gsub (decode, '%d', digits); -- convert this wiki's non-western digits to western digits
 end

 return decode;
end

--[[--------------------------< decodeWaybackDate >-----------------------

Given a URI-path to Wayback (eg. /web/20160901010101/http://example.com )
or Library of Congress Web Archives (eg. /all/20160901010101/http://example.com)
or UK Government Web Archive (eg. /ukgwa/20160901010101/http://example.com or /tna/20160901010101/http://example.com)

return the formatted date eg. "September 1, 2016" in df format
Handle non-digits in snapshot ID such as "re\_" and "-" and "\*"

 valid date string in df format - wayback date is valid (including the text string 'index' when date is '/\*/')
 empty string - wayback date is malformed (less than 8 digits, not a valid date)
 nil - wayback date is '/save/' or otherwise not a number

 second return value is an appropriate 'message' may or may not be formatted

]]

local function decodeWaybackDate(path, df)

 local msg, snapdate;

 snapdate = path:gsub ('^/web/', *):gsub ('^/all/',* ):gsub ('^/ukgwa/', *):gsub ('^/tna/',* ):gsub ('^/', *); -- remove leading /web/, /all/, /ukgwa/, /tna/, or /*
 snapdate = snapdate:match ('^[^/]+'); -- get timestamp
 if snapdate == "\*" then -- eg. /web/\*/http.., etc.
 return 'index'; -- return indicator that this url has an index date
 end

 snapdate = snapdate:gsub ('%a%a\_%d?$', *):gsub ('%-',* ); -- from date, remove any trailing "re\_", dashes

 msg = *;*
 if snapdate:match ('%\*$') then -- a trailing '\*' causes calendar display at archive .org
 snapdate = snapdate:gsub ('%\*$', *); -- remove so not part of length calc later*
 msg = inlineRed (err\_warn\_msgs.ts\_cal, 'warning'); -- make a message
 end

 if not tonumber(snapdate) then
 return nil, 'ts\_nan'; -- return nil (fatal error flag) and message selector
 end

 local dlen = snapdate:len();
 if dlen < 8 then -- we need 8 digits TODO: but shouldn't this be testing for 14 digits?
 return *, inlineRed (err\_warn\_msgs.ts\_short, 'error'); -- return empty string and error message*
 end

 local year, month, day = snapdate:match ('(%d%d%d%d)(%d%d)(%d%d)'); -- no need for snapdatelong here

 if not is\_valid\_date (year, month, day) then
 return *, inlineRed (err\_warn\_msgs.ts\_date, 'error'); -- return empty string and error message*
 end

 snapdate = table.concat ({year, month, day}, '-'); -- date comparisons are all done in iso format
 if 14 == dlen then
 return snapdate, msg; -- return date with message if any
 else
 return snapdate, msg .. inlineRed (err\_warn\_msgs.ts\_len, 'warning'); -- return date with warning message(s)
 end
end

--[[--------------------------< decodeArchiveisDate >-----------------------

Given an Archive.is "long link" URI-path (e.g. /2016.08.28-144552/http://example.com)
return the date in df format (e.g. if df = dmy, return 28 August 2016)
Handles "." and "-" in snapshot date, so 2016.08.28-144552 is same as 20160828144552

 valid date string in df format - archive.is date is valid (including the text string 'short link' when url is the short form)
 empty string - wayback date is malformed (not a number, less than 8 digits, not a valid date)
 nil - wayback date is '/save/'

 second return value is an appropriate 'message' may or may not be formatted

]]

local function decodeArchiveisDate(path, df)
 local snapdate

 if path:match ('^/%w+$') then -- short form url path is '/' followed by some number of base 62 digits and nothing else
 return "short link" -- e.g. http://archive.is/hD1qz
 end

 snapdate = mw.text.split (path, '/')[2]:gsub('[%.%-]', *); -- get snapshot date, e.g. 2016.08.28-144552; remove periods and hyphens*

 local dlen = string.len(snapdate)
 if dlen < 8 then -- we need 8 digits TODO: but shouldn't this be testing for 14 digits?
 return *, inlineRed (err\_warn\_msgs.ts\_short, 'error'); -- return empty string and error message*
 end

 local year, month, day = snapdate:match ('(%d%d%d%d)(%d%d)(%d%d)'); -- no need for snapdatelong here

 if not is\_valid\_date (year, month, day) then
 return *, inlineRed (err\_warn\_msgs.ts\_date, 'error'); -- return empty string and error message*
 end

 snapdate = table.concat ({year, month, day}, '-'); -- date comparisons are all done in iso format
 if 14 == dlen then
 return snapdate; -- return date
 else
 return snapdate, inlineRed (err\_warn\_msgs.ts\_len, 'warning'); -- return date with warning message
 end
 end

--[[--------------------------< serviceName >-----------------------

Given a domain extracted by mw.uri.new() (eg. web.archive.org) set tail string and service ID

]]

local function serviceName(host, no\_link)
 local tracking;
 local index;

 host = host:lower():gsub ('^web%.(.+)', '%1'):gsub ('^www%.(.+)', '%1'); -- lowercase, remove web. and www. subdomains

 if services[host] then
 index = host;
 else
 for k, \_ in pairs (services) do
 if host:find ('%f[%a]'..k:gsub ('([%.%-])', '%%%1')) then
 index = k;
 break;
 end
 end
 end

 if index then
 local out = {*}; -- empty string in [1] so that concatenated result has leading single space*
 ulx.url1.service = services[index][4] or 'other';
 tracking = services[index][5] or categories.other;
 -- build tail string
 if false == services[index][1] then -- select prefix
 table.insert (out, prefixes.at);
 elseif true == services[index][1] then
 table.insert (out, prefixes.atthe);
 else
 table.insert (out, services[index][1]);
 end

 table.insert (out, make\_wikilink (services[index][2], services[index][3], no\_link)); -- add article wikilink
 if services[index][6] then -- add tail postfix if it exists
 table.insert (out, services[index][6]);
 end

 ulx.url1.tail = table.concat (out, ' '); -- put it all together; result has leading space character

 else -- here when unknown archive
 ulx.url1.service = 'other';
 tracking = categories.unknown;
 ulx.url1.tail = table.concat ({*, prefixes.at, host, inlineRed (err\_warn\_msgs.unknown\_url, error)}, ' ');*
 end

 track[tracking] = 1
end

--[[--------------------------< parseExtraArgs >-----------------------

Parse numbered arguments starting at 2, such as url2..url10, date2..date10, title2..title10
 For example: Template loop detected: Template:Webarchive
 Three url arguments not in numeric sequence (1..4..7).
 Function only processes arguments numbered 2 or greater (in this case 4 and 7)
 It creates numeric sequenced table entries like:
 urlx.url2.url = <argument value for url4>
 urlx.url3.url = <argument value for url7>
 Returns the number of URL arguments found numbered 2 or greater (in this case returns "2")

 ]]

local function parseExtraArgs(args)

 local i, j, argurl, argurl2, argdate, argtitle

 j = 2
 for i = 2, config.maxurls do
 argurl = "url" .. i
 if args[argurl] then
 argurl2 = "url" .. j
 ulx[argurl2] = {}
 ulx[argurl2]["url"] = args[argurl]
 argdate = "date" .. i
 if args[argdate] then
 ulx[argurl2]["date"] = args[argdate]
 else
 ulx[argurl2]["date"] = inlineRed (err\_warn\_msgs.date\_miss, 'warning');
 end

 argtitle = "title" .. i
 if args[argtitle] then
 ulx[argurl2]["title"] = args[argtitle]
 else
 ulx[argurl2]["title"] = nil
 end
 j = j + 1
 end
 end

 if j == 2 then
 return 0
 else
 return j - 2
 end
end

--[[--------------------------< comma >-----------------------

Given a date string, return "," if it's MDY

]]

local function comma(date)
 return (date and date:match ('%a+ +%d%d?(,) +%d%d%d%d')) or *;*
end

--[[--------------------------< createRendering >-----------------------

Return a rendering of the data in ulx[][]

]]

local function createRendering()

 local displayfield
 local out = {};

 local index\_date, msg = ulx.url1.date:match ('(index)(.\*)'); -- when ulx.url1.date extract 'index' text and message text (if there is a message)
 ulx.url1.date = ulx.url1.date:gsub ('index.\*', 'index'); -- remove message

 if 'none' == ulx.url1.format then -- For Template:Wayback, Template:Webcite
 table.insert (out, '['); -- open extlink markup
 table.insert (out, ulx.url1.url); -- add url

 if ulx.url1.title then
 table.insert (out, ' ') -- the required space
 table.insert (out, ulx.url1.title) -- the title
 table.insert (out, ']'); -- close extlink markup
 table.insert (out, ulx.url1.tail); -- tail text
 if ulx.url1.date then
 table.insert (out, ' ('); -- open date text; TODO: why the html entity? replace with regular space?
 table.insert (out, 'index' == ulx.url1.date and s\_text.archive or s\_text.archived); -- add text
 table.insert (out, ' '); -- insert a space
 table.insert (out, ulx.url1.date); -- add date
 table.insert (out, ')'); -- close date text
 end
 else -- no title
 if index\_date then -- when url date is 'index'
 table.insert (out, table.concat ({' ', s\_text.Archive\_index, ']'})); -- add the index link label
 table.insert (out, msg or *); -- add date mismatch message when url date is /\*/ and |date= has valid date*
 else
 table.insert (out, table.concat ({' ', s\_text.Archived, '] '})); -- add link label for url has timestamp date (will include mismatch message if there is one)
 end
 if ulx.url1.date then
 if 'index' ~= ulx.url1.date then
 table.insert (out, ulx.url1.date); -- add date when data is not 'index'
 end
 table.insert (out, comma(ulx.url1.date)); -- add ',' if date format is mdy
 table.insert (out, ulx.url1.tail); -- add tail text
 else -- no date
 table.insert (out, ulx.url1.tail); -- add tail text
 end
 end

 if 0 < ulx.url1.extraurls then -- For multiple archive URLs
 local tot = ulx.url1.extraurls + 1
 table.insert (out, '.') -- terminate first url
 table.insert (out, table.concat ({' ', s\_text.addlarchives, ': '})); -- add header text

 for i=2, tot do -- loop through the additionals
 local index = table.concat ({'url', i}); -- make an index
 displayfield = ulx[index]['title'] and 'title' or 'date'; -- choose display text
 table.insert (out, '['); -- open extlink markup
 table.insert (out, ulx[index]['url']); -- add the url
 table.insert (out, ' '); -- the required space
 table.insert (out, ulx[index][displayfield]); -- add the label
 table.insert (out, ']'); -- close extlink markup
 table.insert (out, i==tot and '.' or ', '); -- add terminator
 end
 end
 return table.concat (out); -- make a big string and done

 else -- For Template:Cite archives
 if 'addlarchives' == ulx.url1.format then -- Multiple archive services
 table.insert (out, table.concat ({s\_text.addlarchives, ': '})); -- add header text
 else -- Multiple pages from the same archive
 table.insert (out, table.concat ({s\_text.addlpages, ' '})); -- add header text
 table.insert (out, ulx.url1.date); -- add date to header text
 table.insert (out, ': '); -- close header text
 end

 local tot = ulx.url1.extraurls + 1;
 for i=1, tot do -- loop through the additionals
 local index = table.concat ({'url', i}); -- make an index
 table.insert (out, '['); -- open extlink markup
 table.insert (out, ulx[index]['url']); -- add url
 table.insert (out, ' '); -- add required space

 displayfield = ulx[index]['title'];
 if 'addlarchives' == ulx.url1.format then
 if not displayfield then
 displayfield = ulx[index]['date']
 end
 else -- must be addlpages
 if not displayfield then
 displayfield = table.concat ({s\_text.Page, ' ', i});
 end
 end
 table.insert (out, displayfield); -- add title, date, page label text
 table.insert (out, ']'); -- close extlink markup
 table.insert (out, (i==tot and '.' or ', ')); -- add terminator
 end
 return table.concat (out); -- make a big string and done
 end
end

--[[--------------------------< P A R A M E T E R \_ N A M E \_ X L A T E >--------------------------------------

for internaltionalization, translate local-language parameter names to their English equivalents

TODO: return error message if multiple aliases of the same canonical parameter name are found?

returns two tables:
 new\_args - holds canonical form parameters and their values either from translation or because the parameter was already in canonical form
 origin - maps canonical-form parameter names to their untranslated (local language) form for error messaging in the local language

unrecognized parameters are ignored

]]

local function parameter\_name\_xlate (args, params, enum\_params)
 local name; -- holds modifiable name of the parameter name during evaluation
 local enum; -- for enumerated parameters, holds the enumerator during evaluation
 local found = false; -- flag used to break out of nested for loops
 local new\_args = {}; -- a table that holds canonical and translated parameter k/v pairs
 local origin = {}; -- a table that maps original (local language) parameter names to their canonical name for local language error messaging
 local unnamed\_params; -- set true when unsupported positional parameters are detected

 for k, v in pairs (args) do -- loop through all of the arguments in the args table
 name = k; -- copy of original parameter name

 if 'string' == type (k) then
 if non\_western\_digits then -- true when non-western digits supported at this wiki
 name = mw.ustring.gsub (name, '%d', digits); -- convert this wiki's non-western digits to western digits
 end

 enum = name:match ('%d+$'); -- get parameter enumerator if it exists; nil else

 if not enum then -- no enumerator so looking for non-enumnerated parameters
 -- TODO: insert shortcut here? if params[name] then name holds the canonical parameter name; no need to search further
 for pname, aliases in pairs (params) do -- loop through each parameter the params table
 for \_, alias in ipairs (aliases) do -- loop through each alias in the parameter's aliases table
 if name == alias then
 new\_args[pname] = v; -- create a new entry in the new\_args table
 origin [pname] = k; -- create an entry to make canonical parameter name to original local language parameter name
 found = true; -- flag so that we can break out of these nested for loops
 break; -- no need to search the rest of the aliases table for name so go on to the next k, v pair
 end
 end

 if found then -- true when we found an alias that matched name
 found = false; -- reset the flag
 break; -- go do next args k/v pair
 end
 end
 else -- enumerated parameters
 name = name:gsub ('%d$', '#'); -- replace enumeration digits with place holder for table search
 -- TODO: insert shortcut here? if num\_params[name] then name holds the canonical parameter name; no need to search further
 for pname, aliases in pairs (enum\_params) do -- loop through each parameter the num\_params table
 for \_, alias in ipairs (aliases) do -- loop through each alias in the parameter's aliases table
 if name == alias then
 pname = pname:gsub ('#$', enum); -- replace the '#' place holder with the actual enumerator
 new\_args[pname] = v; -- create a new entry in the new\_args table
 origin [pname] = k; -- create an entry to make canonical parameter name to original local language parameter name
 found = true; -- flag so that we can break out of these nested for loops
 break; -- no need to search the rest of the aliases table for name so go on to the next k, v pair
 end
 end

 if found then -- true when we found an alias that matched name
 found = false; -- reset the flag
 break; -- go do next args k/v pair
 end
 end
 end
 else
 unnamed\_params = true; -- flag for unsupported positional parameters
 end
 end -- for k, v
 return new\_args, origin, unnamed\_params;
end

--[[--------------------------< W E B A R C H I V E >----------------------------------------------------------

template entry point

]]

local function webarchive(frame)
 local args = getArgs (frame);

 local data = mw.loadData (table.concat ({ -- make a data module name; sandbox or live
 'Module:Webarchive/data',
 frame:getTitle():find('sandbox', 1, true) and '/sandbox' or  *-- this instance is ./sandbox then append /sandbox*
 }));
 categories = data.categories; -- fill in the forward declarations
 config = data.config;
 if data.digits.enable then
 digits = data.digits; -- for i18n; table of digits in the local wiki's language
 non\_western\_digits = true; -- use\_non\_western\_digits
 end
 err\_warn\_msgs = data.err\_warn\_msgs;
 excepted\_pages = data.excepted\_pages;
 month\_num = data.month\_num; -- for i18n; table of month names in the local wiki's language
 prefixes = data.prefixes;
 services = data.services;
 s\_text = data.s\_text;
 uncategorized\_namespaces = data.uncategorized\_namespaces;
 uncategorized\_subpages = data.uncategorized\_subpages;

 local origin = {}; -- holds a map of English to local language parameter names used in the current template; not currently used
 local unnamed\_params; -- boolean set to true when template call has unnamed parameters
 args, origin, unnamed\_params = parameter\_name\_xlate (args, data.params, data.enum\_params); -- translate parameter names in args to English

 local date, format, msg, udate, uri, url;
 local ldf = 'iso'; -- when there is no |date= parameter, render url dates in iso format

 if args.url and args.url1 then -- URL argument (first)
 return inlineError (data.crit\_err\_msgs.conflicting, {origin.url, origin.url1});
 end

 url = args.url or args.url1;

 if not url then
 return inlineError (data.crit\_err\_msgs.empty);
 end
 -- these iabot bugs perportedly fixed; removing these causes lua script error
--[[ -- at Template:Webarchive/testcases/Production; resolve that before deleting these tests
 if mw.ustring.find( url, "https://web.http", 1, true ) then -- track bug - TODO: IAbot bug; not known if the bug has been fixed; deferred
 track[categories.error] = 1;
 return inlineError (data.crit\_err\_msgs.iabot1);
 end
 if url == "https://web.archive.org/http:/" then -- track bug - TODO: IAbot bug; not known if the bug has been fixed; deferred
 track[categories.error] = 1;
 return inlineError (data.crit\_err\_msgs.iabot2);
 end
]]

 if not (url:lower():find ('^http') or url:find ('^//')) then
 return inlineError (data.crit\_err\_msgs.invalid\_url );
 end

 ulx.url1 = {}
 ulx.url1.url = url

 ulx.url1.extraurls = parseExtraArgs(args)

 local good = false;
 good, uri = pcall (mw.uri.new, ulx.url1.url); -- get a table of uri parts from this url; protected mode to prevent lua error when ulx.url1.url is malformed

 if not good or nil == uri.host then -- abandon when ulx.url1.url is malformed
 return inlineError (data.crit\_err\_msgs.invalid\_url);
 end

 serviceName(uri.host, args.nolink)

 if args.date and args.date1 then -- Date argument
 return inlineError (data.crit\_err\_msgs.conflicting, {origin.date, origin.date1});
 end

 date = args.date or args.date1;
 date = date and date:gsub (' +', ' '); -- replace multiple spaces with a single space

 if date and config.verifydates then
 if '\*' == date then
 date = 'index';
 ldf = 'iso'; -- set to default format
 elseif 'mdy' == date then
 date = nil; -- if date extracted from URL,
 ldf = 'mdy'; -- then |date=mdy overrides iso
 elseif 'dmy' == date then
 date = nil; -- if date extracted from URL,
 ldf = 'dmy'; -- then |date=dmy overrides iso
 elseif 'ymd' == date then
 date = nil; -- if date extracted from URL,
 ldf = 'ymd'; -- then |date=ymd overrides iso
 else
 date, ldf = decode\_date (date); -- get an iso format date from date and get date's original format
 end
 end

 if 'wayback' == ulx.url1.service or 'locwebarchives' == ulx.url1.service or 'ukgwa' == ulx.url1.service then
 if date then
 if config.verifydates then
 if ldf then
 udate, msg = decodeWaybackDate (uri.path); -- get the url date in iso format and format of date in |date=; 'index' when wayback url date is \*
 if not udate then -- this is the only 'fatal' error return
 return inlineError (data.crit\_err\_msgs[msg]);
 end

 if udate ~= date then -- date comparison using iso format dates
 date = udate;
 msg = table.concat ({
 inlineRed (err\_warn\_msgs.mismatch, 'warning'), -- add warning message
 msg, -- add message if there is one
 });
 end
 end
 end
 else -- no |date=
 udate, msg = decodeWaybackDate (uri.path);

 if not udate then -- this is the only 'fatal' error return
 return inlineError (data.crit\_err\_msgs[msg]);
 end

 if  *== udate then*
 date = nil; -- unset
 else
 date = udate;
 end
 end

 elseif 'webcite' == ulx.url1.service then
 if date then
 if config.verifydates then
 if ldf then
 udate = decodeWebciteDate (uri.path); -- get the url date in iso format
 if 'query' ~= udate then -- skip if query
 if udate ~= date then -- date comparison using iso format dates
 date = udate;
 msg = table.concat ({
 inlineRed (err\_warn\_msgs.mismatch, 'warning'),
 });
 end
 end
 end
 end
 else
 date = decodeWebciteDate( uri.path, "iso" )
 if date == "query" then
 date = nil; -- unset
 msg = inlineRed (err\_warn\_msgs.date\_miss, 'warning');
 elseif not date then -- invalid base62 string
 date = inlineRed (err\_warn\_msgs.date1, 'error');
 end
 end

 elseif 'archiveis' == ulx.url1.service then
 if date then
 if config.verifydates then
 if ldf then
 udate, msg = decodeArchiveisDate (uri.path) -- get the url date in iso format
 if 'short link' ~= udate then -- skip if short link
 if udate ~= date then -- date comparison using iso format dates
 date = udate;
 msg = table.concat ({
 inlineRed (err\_warn\_msgs.mismatch, 'warning'), -- add warning message
 msg, -- add message if there is one
 });
 end
 end
 end
 end
 else -- no |date=
 udate, msg = decodeArchiveisDate( uri.path, "iso" )
 if udate == "short link" then
 date = nil; -- unset
 msg = inlineRed (err\_warn\_msgs.date\_miss, 'warning');
 elseif  *== udate then*
 date = nil; -- unset
 else
 date = udate;
 end
 end

 else -- some other service
 if not date then
 msg = inlineRed (err\_warn\_msgs.date\_miss, 'warning');
 end
 end

 if 'index' == date then
 ulx.url1.date = date .. (msg or *); -- create index + message (if there is one)*
 elseif date then
 ulx.url1.date = makeDate (date, nil, nil, ldf) .. (msg or *); -- create a date in the wiki's local language + message (if there is one)*
 else
 ulx.url1.date = msg;
 end

 format = args.format; -- Format argument

 if not format then
 format = "none"
 else
 for k, v in pairs (data.format\_vals) do -- |format= accepts two specific values loop through a table of those values
 local found; -- declare a nil flag
 for \_, p in ipairs (v) do -- loop through local language variants
 if format == p then -- when |format= value matches
 format = k; -- use name from table key
 found = true; -- declare found so that we can break out of outer for loop
 break; -- break out of inner for loop
 end
 end

 if found then
 break;
 end
 end

 if format == "addlpages" then
 if not ulx.url1.date then
 format = "none"
 end
 elseif format == "addlarchives" then
 format = "addlarchives"
 else
 format = "none"
 end
 end
 ulx.url1.format = format

 if args.title and args.title1 then -- Title argument
 return inlineError (data.crit\_err\_msgs.conflicting, {origin.title, origin.title1});
 end

 ulx.url1.title = args.title or args.title1;

 local rend = createRendering()
 if not rend then
 return inlineError (data.crit\_err\_msgs.unknown);
 end

 return rend .. ((unnamed\_params and inlineRed (err\_warn\_msgs.unnamed\_params, 'warning')) or *) .. createTracking();*

end

--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]

return {webarchive = webarchive};. BBC News. Retrieved 10 January 2013
104. ↑ Willistein, Paul (23 November 2012). 'Skyfall' Bond 'Bourne' again.
105. ↑ "Skyfall: Daniel Craig at world premiere in London", BBC News Online, 23 October 2012.
106. ↑ Mayer, Catherine (2016). *Charles: the Heart of a King*. Ebury Publishing, page 175. ISBN 978-0-7535-5595-8.
107. ↑ Skyfall: Worldwide release dates. Danjaq.
108. ↑ Vlessing, Etan. "Sam Mendes' 'Skyfall' First James Bond Film on Imax Screens", *The Hollywood Reporter*, 23 February 2012.
109. ↑ Vlessing, Etan. "IMAX to Release 'Skyfall' a Day Early in North America", *The Hollywood Reporter*, 18 October 2012.
110. ↑ Bercovici, Jeff. "James Bond in 'Skyfall': Hero, Patriot and ... Exploiter of Sex Trafficking Victims?", *Forbes*, 9 November 2012.
111. ↑ Box Office Results: Skyfall Becomes Sony's Highest-Grossing Film Ever. CraveOnline (17 December 2012).
112. ↑ 2012 Worldwide Grosses. Box Office Mojo.
113. ↑ 113.0 113.1 Subers, Ray (19 November 2012). Around-the-World Roundup: Bond is Back with $80.6 Million Overseas. Box Office Mojo.
114. ↑ Child, Ben. "Skyfall smashes UK box office records", *The Guardian*, 29 October 2012.
115. ↑ Child, Ben. "Skyfall breaks UK seven-day box-office record", *The Guardian*, 5 November 2012.
116. ↑ Child, Ben. "Skyfall becomes this year's biggest seller at the UK box office", *The Guardian*, 9 November 2012.
117. ↑ Gant, Charles. "Skyfall windfall is UK box office's biggest ever", *The Guardian*, 5 December 2012.
118. ↑ McClintock, Pamela. "Box Office Milestone: Daniel Craig's 'Skyfall' Crosses $1 Billion Worldwide", *The Hollywood Reporter*, 30 December 2012.
119. ↑ All Time Worldwide Box Office Grosses. Box Office Mojo.
120. ↑  (2013) *Guinness World Records 2014*. Guinness World Records Ltd., page 203. ISBN 978-1-908843-15-9.
121. ↑ Subers, Ray (4 November 2012). Around-the-World Roundup: 'Skyfall' Adds Incredible $156 Million Overseas. Box Office Mojo.
122. ↑ UPDATED: 'Skyfall' International Total Hits $287 Million; Sony Int'l Sets New Record. boxoffice.com (4 November 2012).
123. ↑ 123.0 123.1 Subers, Ray (8 November 2012). Forecast: 'Skyfall' Lands in U.S. Theaters After Killing Overseas. Box Office Mojo.
124. ↑ Subers, Ray (10 November 2012). Friday Report: 'Skyfall' Soars on Opening Day. Box Office Mojo.
125. ↑ Franchises: James Bond. Box Office Mojo.
126. ↑ 2012 Domestic Grosses. Box Office Mojo.
127. ↑ Funaro, Kaitlin. "'Skyfall' has best Bond debut ever with $30.8 million", *Global Post*, 10 November 2012.
128. ↑ Skyfall (2012). Fandango.
129. ↑ Skyfall Reviews. CBS Interactive.
130. ↑ Finke, Nikki (10 November 2012). FRIDAY: 'Skyfall' Soars To $33M For $88M Weekend In U.S. & Canada As Biggest Bond; Can It Reach $500M Global Thru Sunday? Spielberg's 'Lincoln' Huge In Just 11 Runs. Deadline.
131. ↑ The reviews in question are:

	* Muir, Kate. "Bond's resurrection is one to die for", 13 October 2012, p. 4.
	* French, Philip. "Skyfall – review", 28 October 2012, p. 32.
	* Krupa, Daniel (12 October 2012). 007 Reporting For Duty, Ma'am. IGN.
	* "Dial M for the best Bond ever?", 26 October 2012.
	* "Skyfall Has it All", 26 October 2012, pp. 50–51.
132. ↑ 132.0 132.1 McCarthy, Todd. "Skyfall Review Daniel Craig", *The Hollywood Reporter*, 13 October 2012.
133. ↑ Debruge, Peter. "Skyfall", *Variety*, 13 October 2012.
134. ↑ 134.0 134.1 Dargis, Manohla. "What a Man! What a Suit!", 7 November 2012.
135. ↑ 135.0 135.1 135.2 135.3 Newman, Kim. Skyfall. *Empire*. Bauer Consumer Media.
136. ↑ 136.0 136.1 136.2 Ebert, Roger. "Craig's 007 reinvigorated in 'Skyfall'", RogerEbert.com, originally Chicago Sun-Times.
137. ↑ 137.0 137.1 137.2 Gilbey, Ryan. "Skyfall—review", 29 October 2012.
138. ↑ 138.0 138.1 French, Philip. "Skyfall – review", 28 October 2012, p. 32.
139. ↑ 139.0 139.1 Krupa, Daniel (12 October 2012). 007 Reporting For Duty, Ma'am. IGN.
140. ↑ 140.0 140.1 140.2 Porter, Edward. "Premium Bond pays dividends", 28 October 2012, p. 15.
141. ↑ 141.0 141.1 McCartney, Jenny. "Older and wiser", 28 October 2012, p. 19.
142. ↑ 142.0 142.1 142.2 Miller, Henry K. (26 October 2012). Film of the week: Skyfall. *Sight & Sound*. British Film Institute.
143. ↑ The reviewers in question are:

	* Porter, Edward. "Premium Bond pays dividends", 28 October 2012, p. 15.
	* Krupa, Daniel (12 October 2012). 007 Reporting For Duty, Ma'am. IGN.
	* Lyttelton, Oliver (12 October 2012). Review: Sam Mendes' 007 Film 'Skyfall' Sees James Bond Back To His Best. IndieWire.
144. ↑ Hornaday, Ann. "Bond elegantly goes back and forth", 2 November 2012, p. T29.
145. ↑ Phillips, Michael. "Still to die for Despite some AARP-type issues, Bond franchise remains spry", 7 November 2012, p. C1.
146. ↑ "Skyfall reviews: This is James Bond's Dark Knight moment", 15 October 2012.
147. ↑ Xan Brooks. "Skyfall – first look review", *The Guardian*, 13 October 2012.
148. ↑ "Bond Hit 'Skyfall' Releases on DVD and Blu-ray February 12; All Six Bonds at the Academy Awards", *IndieWire*, 24 January 2013.
149. ↑ Skyfall DVD/Blu-ray Info Released. Danjaq.
150. ↑ "Oscars 2013: Full list of winners", 25 February 2013.
151. ↑ "2012 ADG Awards", 10 April 2017.
152. ↑ EE British Academy Film Awards Nominations in 2013. British Academy of Film and Television Arts (9 January 2013).
153. ↑ Critics' Choice Movie Awards. Broadcast Film Critics Association.
154. ↑ O'Hara, Helen (24 March 2013). Skyfall Wins The Jameson Empire Awards. *Empire Online*. Empire.
155. ↑ 2012 – Winners of the 23rd Annual Chicago Film Critics Awards. Chicago Film Critics Association.
156. ↑ Halperin, Shirley. "Golden Globes 2013: Adele Wins for 'Skyfall'", *The Hollywood Reporter*, 13 January 2013.
157. ↑ "56th Annual GRAMMY Awards Nominees", Grammy, 6 December 2013.
158. ↑ And the JUPITER AWARD goes to... Sam Mendes // JUPITER AWARD 2013. *Cinema Magazine* (18 April 2013).
159. ↑ 33rd London Critics' Circle Film Awards Nominations. London Film Critics Circle Awards (18 December 2012).
160. ↑ LA Film Critics Vote Michael Haneke's 'Amour' Best Pic, Paul Thomas Anderson Best Director For 'The Master' (9 December 2012).
161. ↑ PGA Motion Picture Nominees Announced. Producers Guild of America (2 January 2013).
162. ↑ 2012 Nominees. International Press Academy.
163. ↑ Nominations for the 39th Annual Saturn Awards. Academy of Science Fiction, Fantasy & Horror Films.
164. ↑ Brooks, Brian (2 December 2012). Screen Actors Guild Unveils 19th Annual Award Nominees. Movieline.
165. ↑ The 2012 WAFCA Awards. Washington D.C. Area Film Critics Association (10 December 2012).

### Sources

* (2015) *Some Kind of Hero: The Remarkable Story of the James Bond Films*. The History Press. ISBN 978-0-7509-6421-0.

## External links

* Skyfall at Wikipedia

* *Skyfall* at James Bond Wiki
* *Skyfall* at the Internet Movie Database
* *Skyfall* at the TCM Movie Database
* *Skyfall* at Metro-Goldwyn-Mayer
* *Skyfall* at AFI Catalog